The Kentucky House and Senate on Tuesday voted to override Democratic Governor Steve Beshear's veto of a “religious freedom” bill.

Gay rights advocates had lobbied against the controversial measure, warning that it could be used to challenge local laws which ban discrimination based on sexual orientation.

Both chambers voted overwhelmingly to approve the measure (79-15 in the House, 32-6 in the Senate), which will take effect in 90 days.

“As I explained in my veto message, I have significant concerns that this bill will cause serious unintentional consequences that could threaten public safety, health care and individuals' civil rights,” Beshear said in a statement.

The measure, HB 279, prevents the government from infringing on any person's sincerely held religious beliefs unless it can show with “clear and convincing evidence” a compelling governmental interest.

Chris Hartman, director of the Fairness Campaign, called passage “sad” and “disheartening.”

“Today, the commonwealth took a step backwards in protecting its residents at the same time the United States Supreme Court was hearing arguments that will advance the rights of Americans. It's sad and it's disheartening,” he said.