President Biden on Monday signed an executive order reversing former President Trump’s ban on transgender individuals serving in the U.S. military, saying it is "the right thing to do" and is in the "national interest" of the United States.

The order sets the policy that all Americans who are "qualified" to serve in the Armed Forces of the United States should be able to do so.

FLASHBACK: TRUMP ISSUES ORDER TO BAN TRANSGENDER TROOPS FROM SERVICE EXCEPT IN 'LIMITED CIRCUMSTANCES'

The Biden administration stressed that the U.S. military "thrives" when it is composed of diverse Americans who can "meet the rigorous standards for military service," and added that "an inclusive military strengthens our national security."

"President Biden believes that gender identity should not be a bar to military service, and that America’s strength is found in its diversity," the White House said. "This question of how to enable all qualified Americans to serve in the military is easily answered by recognizing our core values."

The White House added that America "is stronger, at home and around the world, when it is inclusive," and said "the military is no exception."

"Allowing all qualified Americans to serve their country in uniform is better for the military and better for the country because an inclusive force is a more effective force," the White House said. "Simply put, it’s the right thing to do and is in our national interest."

FLASHBACK: COURT THROWS OUT TRUMP'S APPEAL TO KEEP TRANSGENDER PEOPLE FROM ENLISTING IN MILITARY

Biden’s executive order revokes Trump’s presidential memorandum signed in March 2018, and his presidential memorandum in August 2017.

In July 2017, Trump tweeted that the federal government "will not accept or allow transgender individuals to serve in any capacity in the U.S. Military" -- reversing a 2016 policy under President Barack Obama. The move caught the Pentagon by surprise.

"Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail," the president said at the time.

Trump, in March 2018, officially authorized the ability of the Pentagon to ban transgender individuals from joining the military, with limited exceptions, after making the pledge to do so in 2017.

But in February 2018, then-Defense Secretary James Mattis, breaking with Trump, formally recommended that transgender troops be allowed to serve in the U.S. military provided they can deploy overseas.

Trump's policy was a reversal of an Obama-era policy, after former Obama Defense Secretary Ash Carter ended a ban on transgender individuals, and allowed them to serve openly in the military, beginning in 2016. Under the Obama policy, transgender troops were able to receive medical care and were able to start formally changing their identifications in the Pentagon's personnel system. 

But Carter, in 2016, also gave the services until July 1, 2017 to develop policies to allow people already identifying as transgender to newly join the military, if they meet physical, medical and other standards, and have been stable in their identified genders for 18 months.

"I continue to maintain that what matters in choosing those who serve is that they are best qualified," Carter said in a statement. "To choose service members on other grounds than military qualifications is social policy and has no place in our military. 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."

On Monday, Biden Defense Secretary Gen. Lloyd Austin said he fully supports Biden's decision, and said the Pentagon "will immediately take appropriate policy action to ensure individuals who identify as transgender are eligible to enter and serve in their self-identified gender. " 

"These changes will ensure no one will be separated or discharged, or denied reenlistment, solely on the basis of gender identity," Austin said. "This revised policy will also ensure all medically-necessary transition related care authorized by law is available to all Service members and will re-examine all cases of transgender Service members that may be in some form of adverse administrative proceedings." 

Austin added that he will work with senior civilian and military leaders over the next 60 days to "expeditiously  develop the appropriate policies and procedures to implement these changes." 

"The United States Armed Forces are in the business of defending our fellow citizens from our enemies, foreign and domestic.  I believe we accomplish that mission more effectively when we represent all our fellow citizens," Austin said. "I also believe we should avail ourselves of the best possible talent in our population, regardless of gender identity.  We would be rendering ourselves less fit to the task if we excluded from our ranks people who meet our standards and who have the skills and the devotion to serve in uniform." 

Austin added: "This is the right thing to do.  It is also the smart thing to do."

The Associated Press contributed to this report.