ST. PETERSBURG — Mayor Bill Foster announced Thursday he is extending same-sex benefits for all 2,600 city employees, a move that further defies expectations many had of a man with conservative religious beliefs.

"It's the right thing to do," Foster said. "All of our employees should have it."

Coming a day after President Barack Obama endorsed same-sex marriage, Foster hardly looks like a gay rights pioneer. But when coupled with his support for a domestic registry ordinance, the domestic benefits decision clearly sets Foster apart from his predecessor Rick Baker, another religious conservative.

"Baker didn't separate the religion from his job," said Brian Longstreth, a Realtor who was one of the founders of St. Pete Pride. "I appreciate Mayor Foster for doing that. This and a domestic registry are what he promised us when he ran, and I'm pleasantly surprised he followed through on it."

Foster downplayed any higher purpose behind his decision.

"My religious beliefs and my faith in God and my belief in the Bible, that's my moral compass," Foster said. "But as mayor of the city sworn to uphold the constitution and the laws, I oversee the day-to-day operations of the city."

Foster said it was merely a case in which he needed to treat all employees the same.

The city's rank-and-file police officers already had the benefit, which was negotiated into their 2010 contract. A year later, fire department administrators got it.

Foster has said he always intended to extend that benefit to all employees. But 1,551 employees belong to two unions who have hit an impasse in contract negotiations, so that benefit was held back by the city and used as a bargaining chip.

That meant 285 firefighters and 1,266 public service employees weren't getting the benefit.

On Thursday, Foster said he could no longer see an advantage in using domestic benefits as a bargaining chip after agreeing last week to offer the benefit to the city's 630 non-union employees.

"Hooray for the mayor," said Rick Smith, who heads the Florida Public Services Union. "I might have some disagreements with him, but you've got to give him some credit. People don't think he's politically astute, but he has his eye on what's happening."

Michael Van Sickler can be reached at mvansickler@tampabay.com or (727) 893-8037.