Kansas will allow transgender people to change their birth certificates so the documents reflect their gender identities under a legal settlement that Democratic Gov. Laura Kelly's young administration and LGBTQ-rights advocates announced Monday.

The agreement ends a federal lawsuit filed in October by four transgender individuals and the Kansas Statewide Transgender Education Project against officials at the state Department for Health and Environment, which issues birth certificates. U.S. District Judge Daniel Crabtree issued an order Friday to make the agreement binding.

The agreement reverses a policy imposed under conservative Republican Gov. Sam Brownback that gave Kansas among the toughest rules in the nation for changing a gender on a birth certificate. Lambda Legal, a national LGBTQ-rights group that represented the individuals and group suing Kansas, said only Ohio and Tennessee have similar policies in place and that they're being challenged in court too.

The Kansas lawsuit argued that the state's policy violated the right of transgender people to due legal process and equal protection under the law. It also said refusing to allow changes conveyed "an ideological message" and forced transgender people to identify with the sex "incorrectly assigned to them" at birth, violating their free speech rights.

"It was time for Kansas to move past its outdated and discriminatory anti-transgender policy," said Kelly, who took office in January. "This decision acknowledges that transgender people have the same rights as anyone else, including the right to easily obtain a birth certificate that reflects who they are."

The Brownback administration policy prevented transgender people from changing their birth certificates even after they transitioned, changed their names legally and obtained new driver's licenses and Social Security cards, according to the lawsuit. Critics said the policy made it harder for transgender individuals to register to vote and even enroll their children in public schools.

Also, LGBTQ-rights advocates said, once a conflict between a birth certificate and other documents became known, transgender individuals faced discrimination.

"This judgment makes me feel safer and like my state finally recognizes me and respects me as a woman," said plaintiff Nyla Foster, a 30-year-old Kansas City-area resident born in Kansas.

Tom Witt, executive director of the LGBTQ-rights group Equality Kansas, said transgender individuals had been changing their birth certificates for years until Brownback's administration stopped the practice in 2012. The state health department then issued a formal rule in 2016.

"This is absolutely a huge step forward for transgender Kansans," Witt said of the agreement ending the Brownback administration policy.

Supporters of the Brownback administration's policy said at the time that birth certificates are historical records that document the information known at the time. Brownback's spokeswoman added that Kansas law allows only minor corrections in birth certificates and "changing the sex designation is not a minor change."

Brittany Jones, executive director of the conservative Family Policy Alliance of Kansas, said of Kelly, "She demonstrates she's willing to compromise documents and data that are critically important to every Kansan for the sake of a political agenda."

In 2015, Brownback, an opponent of same-sex marriage, rescinded an executive order issued previously by Democratic Gov. Kathleen Sebelius to ban anti-LGBTQ discrimination in state hiring or employment decisions. He argued that the Republican-controlled Legislature — led by social conservatives at the time — should set such policies.

Kelly not only issued a new anti-LGBTQ discrimination order on her second day in office, but hers covered companies that have contracts with the state. She issued a proclamation recognizing June as LGBTQIA+ Pride Month, and Lt. Gov. Lynn Rogers is the keynote speaker for a Pride Unity Rally on Saturday in Wichita.

Omar Gonzalez-Pagan, a senior Lambda Legal attorney, said when Brownback's administration enacted its 2016 policy on birth certificates, 46 states gave transgender people an opportunity to correct them, though their policies varied.

Federal judges last year struck down restrictive policies in Idaho and Puerto Rico, so Lambda Legal was confident it would prevail in Kansas if its lawsuit went to trial, Gonzalez-Pagan said.

He praised Kelly's administration for taking "a fresh look" at the issue and moving to save taxpayers money by avoiding litigation.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM