Home Secretary Charles Clarke has criticised the House of Lords after it defeated government plans to outlaw the "glorification" of terrorism.
Ministers say the 'glorification' offence is necessary
Peers voted down ministers' plans by 160 votes to 156, a majority of four.
It is the second time the Lords have voted against keeping the term in the Terrorism Bill. MPs reinstated it two weeks ago after the first Lords defeat.
Mr Clarke said he was "disappointed" and that he would seek to restore the term when the bill returned to MPs.
"I am disappointed that the Lords have chosen to ignore the clear and repeated signal from the Commons that glorification of terrorism is unacceptable," he said.
"The last Commons vote on glorification was won with a government majority of 38. This was the third time that the Commons voted in favour of outlawing glorification - each time the government majority has increased."
Mr Clarke said the government had made a manifesto commitment to outlaw the glorification of terrorist attacks "and intends to honour it".
"The elected House rightly voted for outlawing glorification and we fully intend to reinstate it when the bill returns to the Commons."
The prime minister said the law would allow action to be taken against people with placards glorifying the 7 July bombers - which were seen in London during protests against cartoons satirising the Prophet Muhammad.
He said the last Commons vote in favour of the new offence had sent a "signal of strength" on fighting terror and he made it clear he expected peers to respect that message.
But critics say existing laws - and plans for a new offence to prevent indirect encouragement of terrorism - mean the glorification offence is not needed.
Former law lord, Lord Lloyd of Berwick, put forward the amendment to remove references to "glorification" from the bill.
Many peers felt the new law was too vague and would curb freedom of speech. It is also opposed by Conservative and Liberal Democrat MPs.
Some Conservative backbench peers defied their leadership to join Liberal Democrats and independent crossbenchers in voting against the government.
Conservative peers had been told by their leadership not to vote against the bill and to keep their powder dry for next week's vote on the ID Cards Bill.
'Tough on terrorism'
But enough Tories ignored this advice so that the Lords voted to remove glorification once again.
Tory Lord Kingsland said the Lords were not "being soft on terrorism".
"It is we who are being tough on terrorism and... by refusing to use its head in relation to this definition, it is the government that is being soft - not for the first time preferring the sound bite to the substance of the matter," he said.
The Terrorism Bill was introduced after July's bomb attacks in London.
It has suffered a rocky ride in Parliament, with MPs voting down plans to allow police to hold suspects for up to 90 days without charge.