Lawmakers in Kentucky have overturned their Governor’s veto on a bill protecting people from prosecution if their actions are “motivated by a sincerely held religious belief”, which human rights campaigners warned would promote discrimination against the state’s LGBT community.

On Friday Kentucky Governor Steve Beshear vetoed House Bill 279, which proposed to give legal protection to those who “act or refuse to act in a manner motivated by a sincerely held religious belief”.

The bill requires state infringements on a person’s religious belief to be justified by “compelling” interest for the law, rather than “reasonable” interest. This will be assessed on a case-by-case basis.

Opponents of the bill are concerned that this will make it harder to prosecute in cases of discrimination, particularly those concerning LGBT people.

The bill, sponsored by Democratic Representative Bob Damron, gained widespread support among Kentucky lawmakers, and was passed on Friday 1 March by the Kentucky House of Representatives 82 to 7, with 11 abstentions. It was then due to go to a Senate hearing before Governor Beshear intervened last week.

Both Kentucky’s House of Representatives and the Senate voted overwhelmingly on Tuesday to override the Governor’s veto, meaning the bill will pass into law.

Governor Beshear’s website revealed that he had vetoed the bill following lobbies from the American Civil Liberties Union and other groups, and that he believed it would weaken civil rights and lead to costly court cases.

He said he was disappointed that his only veto of the 2013 legislative session had been overturned.

“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,” he said.

Kentucky Equality Foundation (KEF) president Jordan Palmer said: “House Bill 279 represents a clear and present danger to the gay and lesbian community and other minority groups around the commonwealth.”

Paul Chitwood, executive director of the Kentucky Baptist Convention, disagreed: “Much to the contrary, this law protects against discrimination. History has proven that religious freedom isn’t to be feared.”

Neither the state of Kentucky nor the US as a nation currently prohibit discrimination against LGBT people in jobs or housing. However, local anti-discrimination laws were recently passed by four Kentucky towns, and campaigners were concerned the bill would undermine them.