A federal judge on Wednesday ruled that President Trump’s firings of two Democrats on the Privacy and Civil Liberties Oversight Board (PCLOB) were unlawful, deeming them “null and void.”

U.S. District Judge Reggie Walton said that PCLOB’s “responsibility” to oversee the government’s counterterrorism actions and policies and recommend changes is “incompatible” with at-will removal by the president.

He invalidated Trump’s firings of Travis LeBlanc and Edward Felten, two of PCLOB’s three Democratic members, after determining that the board’s structure and function “clearly indicate” that Congress meant to restrict the president’s removal power over its members. Trump also fired the third Democratic member, but her term was about to expire, so she did not join the other members’ legal challenge.