Transgender men and women will be allowed to openly serve in the military, Secretary of Defense Ash Carter announced on Thursday — the latest move in a series of historic shifts on gender policy for the nation's military.

“This is the right thing to do for our people and for the force,” Carter said. “We’re talking about talented Americans who are serving with distinction or who want the opportunity to serve. We can’t allow barriers unrelated to a person’s qualifications (to) prevent us from recruiting and retaining those who can best accomplish the mission."

In a year, all the services will also begin allowing transgender individuals to join the armed forces.

Related: OUT EXCLUSIVE: Trans Service Members Detail Historic Meeting With Defense Secretary

By October, the Department of Defense will craft and distribute a commanders’ training handbook, medical protocol and guidance for changing a service member’s gender in the Defense Eligibility Enrollment System. That is also the deadline that all the services will be required to provide medically appropriate care and treatment to transgender service members, according to Department of Defense protocols.

Current members of the armed forces with a diagnosis from a military physician that gender transition is medically needed will receive that care.

However, DoD "policy will require an individual to have completed any medical treatment that their doctor has determined is necessary in connection with their gender transition, and to have been stable in their preferred gender for 18 months, as certified by their doctor, before they can enter the military," according to the Pentagon.

Capt. Jennifer Peace poses near her home in Spanaway, Wash., on Aug. 28, 2015. Peace is one of an estimated 15,000 transgender people who serve in the active-duty military. She's speaking out in the hopes of helping people understand transgender men and women. Drew Perine / The News Tribune via AP

The shift in policy is also a milestone for the administration, which under President Barack Obama, has worked to make LGBT rights and equality a cornerstone of his legacy on social change including lifting the “don’t ask, don’t tell” policy in 2011.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In underscoring the need for the policy change, Carter cited RAND Corporation figures which estimated that out of 1.3 million active duty troops, 2,500 are transgender. Some estimates have those figures as high as 15,500 serving in active duty or in the National Guard or Reserves.

Eighteen countries already allow transgender men and women to serve in the military including the U.K. and Israel, Carter said.

Carter signaled the upcoming policy change last summer when he stressed that the ban on transgender members of the military was "outdated, confusing, inconsistent". He also ordered the military to come up with a new policy within six months.

"We have transgender soldiers, sailors, airmen, and Marines — real, patriotic Americans — who I know are being hurt by an outdated, confusing, inconsistent approach that's contrary to our value of service and individual merit," Carter said at the time.

Related: With Transgender Military Ban Lifted, Obama Cements Historic LGBT Rights Legacy

Since then, the military has implemented a series of changes.

Last month, the Senate confirmed Eric Fanning as Army secretary — the first openly gay leader of any U.S. military service to serve in that role.

In April, the military announced that 22 women are part of the first class of female members of the Army to be commissioned as infantry and armor officers. Such leadership roles were previously open only to men. Later that month, Capt. Kristen Griest became the nation's first female Army infantry officer.

In December, the Pentagon announced it was opening all combat jobs to women.

"This decision flows pretty naturally from the decision to open combat positions to women. There are a variety of logistical issues to resolve, but as with the decisions on women, gays and lesbians, the biggest hindrance to implementation is misinformation and outright discrimination," said Don Haider-Markel, professor and chairman of the political science department at the University of Kansas.

"This is an historic decision for the trans movement and builds more momentum to shifting broader public attitudes," added Haider-Markel who also co-edited the book "Transgender Rights and Politics: Groups, Issue Framing & Policy Adoption."

Gay and civil rights groups applauded the move as a national moral imperative and pointed to the military's other historic moves of racial integration and allowing women to serve as examples of how the armed forces has led the country in social change.

"Today’s victory is a tremendous one for a nation that once denied women, African Americans, and gay and lesbian individuals the opportunity to serve," said Wade Henderson, president of the Leadership Conference on Civil and Human Rights.

We applaud the DoD for ending this unjust ban on #transgender military service: https://t.co/U462fIMuSK pic.twitter.com/5sVk1sSwiY — Lambda Legal (@LambdaLegal) June 30, 2016

House Armed Services Chairman Mac Thornberry said the shift in policy on transgender men and women serving openly in the military is politically motivated.

"This is the latest example of the Pentagon and the President prioritizing politics over policy. Our military readiness—and hence, our national security—is dependent on our troops being medically ready and deployable," Thornberry said in a statement. "The Administration seems unwilling or unable to assure the Congress and the American people that transgender individuals will meet these individual readiness requirements at a time when our Armed Forces are deployed around the world."

He added that he will be "looking at legislative options to address the readiness issues associated with this new policy."

Other lawmakers, such as House Democratic Leader Nancy Pelosi, hailed the military as taking a progressive stand for equality.

“Our military is leading the nation in welcoming the strength and humanity of transgender Americans," Pelosi said in a statement. "As some states pass laws that stand against the tide of history, Congress must act to pass the Equality Act to add sexual orientation and gender identity to the historic Civil Rights Act that guards our democracy. Let us strive to ensure that discrimination has no place in our country.”