President Obama secured his legacy of expanding rights for gays, lesbians and bisexuals Monday by moving to allow transgender members of the military to serve openly.

In backing the Pentagon's initial steps on the military's policy shift, Obama helped lay the groundwork for continuing to reshape the male-dominated armed forces in much the same way he did with the military's prohibition on gays serving openly in the military early in his tenure.

The president is taking a back seat to the Pentagon, which announced a moratorium on discharges of transgender services members and will conduct a six-month study of the implications of permitting transgender members to serve.

Defense Secretary Ashton Carter announced the study late Monday afternoon, mirroring the way the Obama administration brought an end to the military's "Don't Ask, Don't Tell" policy dating back to the Clinton era. That controversial practice allowed gay and bisexual service members to remain in the military free from discrimination as long as they kept their sexuality under wraps.

Clearly supported by Obama, the Democratic-led Congress passed legislation in December 2010 moving for a policy change — but only after the Pentagon studied the issue to ensure that allowing gay military members to serve openly would not harm military readiness.

The measure required the "Don't Ask, Don't Tell" policy to remain in place until the Pentagon studied the issue, and Obama, the secretary of defense, and the chairman of the joint chiefs of staff certified that the repeal would not be harmful to the military, which they did in July 2011.

The new policy shift on allowing transgender members to serve openly is a top priority for the LGBT community, and activists have pressed the White House for months on the issue, sometimes eliciting conflicting signals.

As recently as June 4, the White House press secretary Josh Earnest said the Obama administration has no policy on whether transgender service members should be allowed to serve openly.

In response to an op-ed published by the New York Times editorial board titled "Let Transgender Troops Serve Openly," reporters pressed Earnest on whether the White House has a position on the issue.

"We don't," Earnest replied.

But the president's more recent actions speak louder than words.

In late June, Obama for the first time hosted two active-duty transgender service members, along with four trans veterans, at a White House gay pride reception.

Back in February, Earnest also signaled support for a changing the ban after Defense Secretary Ashton Carter first confronted the issue head-on and said he supported repealing it.

Just days on the job, Carter said he is "open-minded" about people's personal lives when asked about the possibility of transgender troops serving openly.

"I don't think anything but their suitability for service should preclude them," he said.

Earnest pointedly backed up those comments, saying, "I can tell you that the president agrees with the sentiment that all Americans who are qualified to serve should be able to serve, and for that reason, we at the White House welcome the comments of the secretary of defense."

Ending restrictions on transgender service members in the military, the country's single-biggest employer of transgender Americans, was the next logical step for a White House that just weeks ago celebrated the Supreme Court ruling on gay marriage by lighting the White House in rainbow lights.

Earlier Monday, the Obama administration announced new guidance to make it clear that anti-LGBT discrimination will not be tolerated in government sponsored and insured housing, including housing for the elderly.