Critics say the law would stop people speaking out against gay pride events
Ministers have admitted defeat in their efforts to remove a "free speech" defence from new laws against inciting homophobic hatred.
MPs have voted four times to scrap it but it has been repeatedly overturned in the Lords, who again last night voted by 179 to 135 to keep it.
There were fears the law, which would apply in England and Wales only, would leave comedians open to prosecution.
Ministers argued only words intended to stir up hatred were being targeted.
An offence of inciting hatred on the grounds of sexual orientation was brought in by legislation last year, but a "free speech" defence, opposed by the government, was inserted by Conservative peer Lord Waddington.
The law was not brought into force while the government sought to remove the defence but on Thursday, the last day of this Parliamentary session, the government admitted defeat in a statement from the Ministry of Justice.
A spokeswoman said the government was "very disappointed" at the Lords vote and as the threshold for prosecution was "high", the defence was not needed.
She said: "The offence only covers words or behaviour that are threatening and intended to stir up hatred."
But she added the government could no longer delay the passage of the Coroners and Justice Bill.
"It is with considerable disappointment, therefore, that the government has agreed not to remove the 'freedom of expression' section."
She added that the law against inciting homophobic hatred would now be brought into force "as quickly as possible" and the government would return to the issue in future "should it prove necessary to do so".
However the concession was not announced by Justice Secretary Jack Straw in the Commons on Thursday.
Instead deputy speaker Sir Alan Haslehurst read out a list of amendments on which "this House does not insist, in its disagreement with the Lords".
Conservative MP Edward Leigh asked, unsuccessfully, for a statement from Mr Straw, adding it appeared "that the government has run up the white flag on the Lord Waddington amendment. This is a great victory for free speech, I think we should know more about it."
MPs have, on four occasions, voted to remove the free speech clause from the bill by large majorities during its passage through Parliament.
Ahead of Wednesday's vote in the Lords justice minister Lord Bach warned peers: "There must come a point where this House, with all its great virtues, gives way to the House that has been elected by the people of this country."
But Lord Waddington argued that peers had to maintain consistency: "If we are to finish up with a free speech clause in the religious hatred offence but no free speech clause here, we're simply asking for trouble."
Labour peer Lord Smith, who was the first MP to come out openly as gay, warned that a free speech clause could lead to more attacks on homosexuals.
"If the signal that is sent is that it is all right to be intolerant... then I fear that we will end up seeing more violence," he said.
Some comedians have criticised the law, saying it could stifle creativity and even lead to the threat of people being arrested over jokes.
And during the Lords debate crossbencher Lord Dear cited the example of grandmother Pauline Howe, 67, who was visited by police after writing a letter to Norwich Council to complain about a gay pride march.
The council informed her the letter was assessed as "potentially being hate related" - she argued she was expressing her Christian beliefs.
On Thursday Simon Calvert, of The Christian Institute, welcomed the government's decision as a "victory for common sense".
There are no national statistics on homophobic crime but individual police forces such as Merseyside and Strathclyde reported annual rises of over 30% in their latest figures.