WASHINGTON — Even as a lesbian in a conservative Southern state, Katrina Martir managed to thrive in central Kentucky. She married – in another state – is raising an adopted child with her wife and recently started her own consulting business.

But when the former fourth-grade science teacher told her principal in 2010 that she planned to get pregnant and raise a child with her partner, Martir said she was promptly fired because public school officials feared a parent backlash over a lesbian teacher. Martir, 32, decided to sue for employment discrimination and went to see a lawyer. But she soon discovered that there was nothing illegal, either in Kentucky or her county, about firing someone for being gay.

“In most of Kentucky, they can do whatever they want, I guess,” Martir said. “I had three days to pack up.”

The Supreme Court on Friday delivered a landmark victory for same-sex marriage, but gay rights advocates were already preparing for the next great battle: the expansion of federal civil rights laws to protect gays in the workplace and elsewhere.

“The problem is, if gay marriage comes and gay couples go to get married, a number of them will get fired from their jobs for that,” said Bryan Gatewood, a gay rights lawyer in Louisville. He said a Supreme Court victory may even trigger a backlash from conservatives in some states and cities. “You are going to stir all these people up when (gays and lesbians) get married, so you’re going to get more discrimination.”

Though a broad high court ruling may send a legal message throughout the country that discrimination based on sexual orientation is on shaky legal ground, current federal civil rights laws do not explicitly ban such discrimination.

Only 22 states and the District of Columbia have laws against discrimination based on sexual orientation, leaving millions of gays and lesbians without a clear right to rent an apartment, eat at a restaurant or keep their jobs.

“This is the next frontier after gay marriage,” Gatewood said. Legislation to provide comprehensive federal protections for gays and lesbians nationwide is expected to be introduced in the coming weeks by Rep. David Cicilline, D-R.I., in the House and Sen. Jeff Merkley, D-Ore., in the Senate.

With Republican majorities in both chambers of Congress, the bills have little chance of passing anytime soon. But gay rights groups say prospects for gay marriage were similarly dim when that movement started over two decades ago.

“This is about laying the foundation for this legislation to eventually pass,” said Ian Thompson of the American Civil Liberties Union’s Washington office. “A majority of the people support this. It’s only a matter of time before that reality catches up to Congress.”

Opponents of gay rights legislation are also ramping up. They are focusing a rival campaign around religious liberties, claiming that a mandate to serve gays and lesbians might sometimes violate their faith.

Some states, like Mississippi, have passed laws to protect businesses that refuse to serve gays and lesbians as a matter of religious conscience. But sometimes efforts to use religious claims to rebuff anti-discrimination laws have caused a backlash.