WASHINGTON (AP) – Pentagon leaders are finalizing plans aimed at lifting the ban on transgender individuals in the military, with the goal of formally ending one of the last gender- or sexuality-based barriers to military service, senior U.S. officials told The Associated Press.

An announcement is expected this week, and the services would have six months to assess the impact of the change and work out the details, the officials said Monday. Military chiefs wanted time to methodically work through the legal, medical and administrative issues and develop training to ease any transition, and senior leaders believed six months would be sufficient.

During that time, transgender individuals would still not be able to join the military, but any decisions to force out those already serving would be referred to the Pentagon’s acting undersecretary for personnel, the officials said. One senior official said the goal was to avoid forcing any transgender service members to leave during that time.

Several officials familiar with the planning spoke on condition of anonymity because they were not authorized to talk about the issue publicly before the final details have been worked out.

The officials said Defense Secretary Ash Carter has asked his personnel undersecretary, Brad Carson, to set up a working group of senior military and civilian leaders to take an objective look at the issue, identify any problems and develop uniform guidelines.

One senior official said that while the goal is to lift the ban, Carter wants the working group to look at the practical effects, including the costs and what impact, if any, it would have on military readiness.

The move follows several weeks of high level meetings in the Pentagon among top ranking military chiefs, secretaries and Defense Department leaders, including one on Monday involving Carter and the chiefs of the various services.

Transgender people – those who identify with a different gender than they were born with and sometimes take hormone treatments or have surgery to develop the physical characteristics of their preferred gender – are banned from military service. But studies and other surveys have estimated that as many as 15,000 transgender people serve in the active duty military and the reserves, often in secret but in many cases with the knowledge of their unit commander or peers.

Military leaders have pointed to the gradual – and ultimately successful – transition after the ban on gays serving openly in the military was lifted in 2011. Although legislation repealing that ban passed Congress in late 2010, the military services spent months conducting training and reviews before the decision actually took effect the following September.

Early last month, during a ceremony at the department’s Pentagon Pride Month, Carter noted the repeal of the ban. In remarks that hinted at more, he added, “we believe in getting to a place where no one serves in silence, and where we treat all our soldiers, sailors, airmen and Marines with the dignity, and the respect, that they deserve.”

The move comes just weeks after the Supreme Court upheld the right of same-sex couples to marry.

Officials familiar with the Pentagon meetings said the chiefs of the Army, Navy, Marine Corps and Air Force did not express opposition to lifting the ban. Instead, they said the military leaders asked for time to figure out health care, housing and other questions and also to provide information and training to the troops to insure a smooth transition.

In recent weeks, Carson met individually with each service chief and other senior civilian leaders.

Officials said Carter has sought input from the military on the effect of the policy change, but removing that barrier has been one of his goals since his early days in office. During a visit to Afghanistan shortly after he took over, Carter told troops that he was open-minded when asked whether the Defense Department was planning to remove the ban.

Some of the key concerns involved in the repeal of the ban on transgender individuals include whether the military would conduct or pay for the medical costs, surgeries and other treatment associated with any gender transition, as well as which physical training or testing standards transgender individuals would be required to meet during different stages of their transition.

Officials said the military also wants time to tackle questions about where transgender troops would be housed, what uniforms they would wear, what berthing they would have on ships, which bathrooms they would use and whether their presence would affect the ability of small units to work well together.

The military has dealt with many similar questions as it integrated the ranks by race, gender and sexual orientation. And in many cases they raised comparable worries about what effect the change would have, including whether it would hinder small units that often have to work together in remote, confined locations for long periods of time.

Although guidelines require that transgender individuals be dismissed from the military, the services in recent months have required more senior leaders to make the final decisions on those cases, effectively slowing the dismissal process.

The Pentagon had already begun a broad review of the medical standards required for military service, and the transgender policy would have been one of many issues included in that study. That review, however, began in February and is expected to take 12-18 months.

The transgender issue came to the fore as the military struggled with how to deal with convicted national security leaker Chelsea Manning’s request for hormone therapy and other treatment while she’s in prison. Manning, arrested as Bradley Manning, is the first transgender military prisoner to request such treatment, and the Army recently approved the hormone therapy, under pressure from a lawsuit.

Manning, like other service members discovered to be transgender, would have been discharged, but she is serving her 35-year sentence first. The former intelligence analyst was convicted in August 2013 of espionage and other offenses for sending more than 700,000 classified documents to WikiLeaks while working in Iraq.