This article was last updated at 4:49 p.m.

By LOLITA C. BALDOR, Associated Press

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.

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. 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 determine whether it would affect readiness or create any insurmountable problems that could derail the plan. The group would also develop uniform guidelines.

During the six months, 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.

In a statement to The Associated Press, Carter said, "we must ensure that everyone who's able and willing to serve has the full and equal opportunity to do so. And we must treat all of our people with the dignity and respect they deserve. Going forward the Department of Defense must and will continue to improve how we do both."

Some of the key concerns involved in the repeal of the ban 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.

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.

"Obviously this isn't finished, but Secretary Carter's clear statement of intent means that transgender service members should and will be treated with the same dignity as other service members," said Allyson Robinson, Army veteran and policy director for an association of lesbian, gay, bisexual and transgender military personnel called Service members, Partners, and Allies for Respect and Tolerance for All, or SPARTA.

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.

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.

The latest Pentagon 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.

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 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 approved the hormone therapy, under pressure from a lawsuit.

Manning, is serving a 35-year sentence. 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.