The Pentagon announced a military-wide policy Thursday that will grant all new moms 12 weeks of military maternity leave. Depending on a servicewoman’s branch, however, this could mean an increase or reduction in paid leave.

In August, Navy Secretary Raymond Mabus announced that the Marine Corps and Navy would offer a whopping 18 weeks of maternity leave to mothers. The Pentagon’s military-wide maternity policy would sharply reduce that time by a third. However, parents who already arranged for 18 weeks of leave can still use their maximum time.

On the other hand, the Air Force and Army previously only offered six weeks of maternity leave. This policy change is singlehandedly doubling the leave of thousands of military parents.

In total, this policy affects 200,000 women, which accounts for 14.8 percent of enlisted service members and 17.4 percent of officers.

Defense Secretary Ashton Carter said in a press conference that adjusting maternity leave was “imperative for attracting and retaining talent.”

“I concluded that twelve weeks of maternity leave across all of the force establishes the right balance between offering a highly competitive leave policy while also maintaining the readiness of our total force,” Carter said. “Twelve weeks is extremely generous … it puts us in the very top tiers of American employers.”

The goal of the new military maternity leave policy is to stop talented women from leaving the service so they can start families.

Air Force Secretary Deborah Lee James voiced her support for the policy.

“This change places our Air Force in the top tier of organizations that offer 12 weeks maternity leave to new mothers,” James said. “This is the right thing to do. This groundbreaking policy carefully balances our priority focus on mission effectiveness with ongoing efforts to attract and retain talent in a changing workforce.”