Officials from former President Barack Obama’s administration responded to President Donald Trump’s announcement Wednesday that transgender people would not be allowed to serve in the U.S. military.

Former Vice President Joe Biden tweeted Wednesday morning that “every patriotic American who is qualified to serve in our military should be able to serve,” apparently in reference to Trump’s announcement.

Every patriotic American who is qualified to serve in our military should be able to serve. Full stop. — Joe Biden (@JoeBiden) July 26, 2017

Former Defense Secretary Ashton Carter, who in 2016 announced that the Pentagon had dropped a long-standing rule preventing openly trans people from serving in the military, said in a statement Wednesday that what matters is finding military members who are “best qualified.”

“To choose service members on other grounds than military qualifications is social policy and has no place in our military,” Carter said. “There are already transgender individuals who are serving capably and honorably. This action would also send the wrong signal to a younger generation thinking about military service.”

Former Defense Secretary Leon Panetta, who served under Obama from 2011 to 2013, in a statement called Trump’s announcement “a slap in the face to all of those who are created equal and deserve the opportunity to serve their nation.”

In a series of tweets Wednesday morning, Trump claimed he’d consulted with generals and military experts on his decision to prevent trans people from serving. The Pentagon referred all questions about the announcement to the White House.

When Carter announced last year that trans people could serve openly, he said the U.S. had “to have access to 100% of America’s population for our all-volunteer force to be able to recruit from among them the most highly qualified — and to retain them.”

The military became more inclusive for LGBTQ people under the Obama administration, with trans members becoming eligible for service in 2016 and gay men and women being able to serve openly following the 2011 repeal of the controversial “don’t ask, don’t tell” policy.

This article has been updated with comment from Panetta.