New rules outlawing businesses from discriminating against homosexuals have been upheld in the House of Lords.
The rules force a choice between church and state, peers heard
A challenge led by Lord Morrow of the Democratic Unionist Party failed by a margin of three to one.
He had argued that the rules forced people to choose between obedience to God and obedience to the state.
But Northern Ireland Minister Lord Rooker said it would be "quite wrong" to elevate the rights of one group above those of another.
Lord Morrow's call to annul the regulations, which have applied in Northern Ireland since 1 January and are due to be implemented across the UK by April, was defeated by 199 votes to 68.
The Sexual Orientation Regulations have been criticised by some religious groups who say people will not be allowed to act according to faith.
Hundreds of Christians demonstrated outside Parliament, but gay rights groups say no mainstream religious groups supported the protest.
Critics say the new rules mean hotels cannot refuse to provide rooms for gay couples, and religious groups would be obliged to rent out halls for "gay wedding" receptions.
They also argue a Christian, Jewish or Muslim printer could be forced to print a flyer for a gay night club, or a teacher would have to break the law to promote heterosexual marriage over homosexual civil partnership.
Tory peers were allowed a free vote but the Liberal Democrats supported the government, whose Labour supporters were whipped to attend and vote.
Lord Morrow told peers: "The regulations make it possible for homosexual activists to sue people who disagree with a homosexual lifestyle because of their religious beliefs.
"They require religious organisations to choose between obedience to God and obedience to the state."
He added: "The regulations threaten to override the conscience and free speech of Christians and others who object to homosexual practice."
Conservative Lord Tebbit said: "Black is about being. Sexual orientation is about being.
"And we would not wish to discriminate against people for being black nor on grounds of their sexual orientation.
"The concerns which are being expressed this evening are primarily about sodomy rather than about sexual orientation - that is doing, not being."
But Labour's Lord Smith said: "I am somewhat puzzled by the arguments that have been advanced.
"It seems to me, in my simplistic way, that what they (the opponents of the regulations) are arguing for is quite simply the right to discriminate and the right to harass.
"And those arguments are being made in the name of Christianity."
'Fence in behaviour'
One of those taking part in the demonstration outside Parliament, Ralph Brockman, a Baptist from London, told the BBC: "I'm concerned that the Biblical laws should be upheld.
"People may have different orientations but we need to have laws that will fence in our behaviour, as it were."
John Studley, a Christian from London, said: "This government is placing sexual rights over religious rights."
But Neil Partridge, a gay Christian man, said: "Everyone has a right to their faith but is it fair to say to someone 'you can't share a bed in our hotel because you are gay'.
"A hotel is a business, surely. I just think some of the people at this demonstration need to listen to the other side of the argument."
He added: "Recently British Airways was criticised for not allowing staff to wear crucifixes and now some Christians are advocating this policy. I think the recent law is a good thing."
Supporters of the regulations say they simply extend to gay people the same rights that had been granted to people of different faiths in 1998.
A High Court judicial review against the regulations in Northern Ireland, brought by the Christian Institute, will be heard in March.