Florida's nearly 40-year-old ban on gay adoption which hasn't been enforced for the past five years is about to be tossed out by the state's Republican-controlled Legislature.

But it's not going without a fierce debate, including whether the state should adopt a separate law that would let private agencies use religious or moral grounds to turn away gay couples seeking to adopt children.

Some Republicans say this "conscience" law is needed to ensure that faith-based organizations handling adoptions will keep offering their services, but other legislators have compared the measure to Indiana's religious objections law and said it would encourage discrimination against gay couples.

Both the House and Senate spent hours on Wednesday debating the state's existing ban and what will happen if it is permanently removed from law.

Sen. Don Gaetz, R-Niceville, defended the decision to jettison the gay adoption ban and called it a relic of another time that is now meaningless since an appeals court declared the law unconstitutional in 2010.

"We don't need to turn the social clock in this state back to 1977," said Gaetz, who is sponsoring the adoption bill.

Sen. Kelli Stargel, R-Lakeland, tried unsuccessfully to persuade other senators to keep the ban on the books. Stargel argued that getting rid of the ban could lead faith-based organizations to leave the state.

"I'm not going to let something leave this chamber and go to the governor that I think is the wrong policy for the state of Florida," said Stargel.

The Florida Senate on Wednesday gave tentative approval to the bill (HB 7013) that eliminates the ban. It could go to Gov. Rick Scott as soon as next week.

But after an outcry from conservative groups over the demise of the ban, House Republicans have agreed to push forward a separate bill that would "shield" religious organizations if they refuse to place children with gay couples. The bill would bar the state from denying a license or government grant to agencies that follow "written religious or moral convictions."

House Democratic legislators blasted the measure, saying it would allow discrimination. Led by Rep. David Richardson, the chamber's first openly gay member and a Miami Beach Democrat, they tried several times to amend the bill (HB 7111) but House Republicans voted them down.

Rep. Jason Brodeur, R-Sanford and the main sponsor of the "conscience" bill, contended that the law would not prevent gay couples from adopting since they could turn to public agencies.

"There's nothing in this bill that says the community you are talking about, the gay community, can't adopt," Brodeur said. "This bill is about preventing discrimination based on our 1ST Amendment religious freedom."

The House could pass the bill as early as Thursday, but Gaetz told senators that there was no need for the "conscience" legislation. He said Senate lawyers have already concluded that an existing "religious freedom" law on the books would protect any private agencies.