David Cameron has clashed with a Labour MP after joking that he must have been taking "mind-altering substances".
Michael Meacher complained to the Commons Speaker about the prime minister's "unparliamentary" language.
Mr Cameron said the remark had just been meant as "Commons banter" but agreed to withdraw it.
Throughout the session, the PM sought to link Labour policies with drugs allegations facing ex-Co-op Bank boss and Labour councillor Paul Flowers.
Even by the usual standards, this was a raucous and ill-tempered parliamentary half-hour.
When at the end of the session, Michael Meacher raised a point of order with the Speaker, Conservative backbench MPs protested that it was "contrived".
They seemed to suspect John Bercow had almost invited the veteran Labour MP to speak out.
As Mr Meacher made his point, the prime minister leant forward and placed his hand on the dispatch box in front of him - a sign to the Speaker that he intended to reply to the complaint.
Mr Cameron's suggestion that his remarks had been "light-hearted banter" won favour with his own side.
Conservatives cheered and some MPs stamped their feet and kicked the wood panelling in front of them.
The Labour benches were furious and as the prime minister left the chamber there were loud shouts of "shame" from opposition MPs.
In his question, Mr Meacher said recent research had indicated that the UK had fallen behind Mali and other developing countries in terms of business investment and asked the prime minister whether he was happy with this situation.
In response, the prime minister suggested the MP may have "been on a night out on the town with Reverend Flowers" and the "mind-altering substances have taken effect".
Mr Flowers has admitted "serious mistakes" after being filmed buying cocaine.
Mr Cameron's joke angered Mr Meacher, who raised a point of order at the end of Prime Minister's Questions.
Turning to Speaker John Bercow, the veteran Labour MP and former minister said: "As you would have heard, and as everyone else in the House heard, I asked a perfectly reasonable question, which was based on clear documentary evidence as I indicated.
"Is it parliamentary for the prime minister to respond by accusing another right honourable member of sounding as if he had been taking mind-altering substances? I want to ask whether it is parliamentary to use such an unjustifiable, rude and offensive phrase?"
Mr Cameron replied: "I completely respect the right honourable gentleman and the important question he asked, which I tried to answer with the point about inward investment in to Britain.
"I made a light-hearted remark. If it caused any offence, I will happily withdraw it. I think it is very important that we can have a little bit of light-hearted banter and a sense of humour on all sides."
BBC parliamentary correspondent Sean Curran, who watched the half-hour session from the Commons press gallery, said the official line - from spokesmen for both sides - is that they could not hear what was said when the heckles and jeers erupted after the prime minister accused Michael Meacher of taking "mind altering substances"
"It was noisy in the Commons," added our correspondent, "but from my place in the front row of the press gallery I saw senior Labour politicians protest to the Speaker, John Bercow, about Mr Cameron's comments.
"And I heard shadow chancellor Ed Balls repeatedly ask the prime minister, 'Have you taken cocaine?'"
Mr Cameron had earlier taunted Labour leader Ed Miliband over a leaked email from one of his aides that described Mr Balls as a "nightmare", saying he could have told Mr Miliband that "three years ago".
The prime minister has often complained about the shadow chancellor's heckling of him during Prime Minister's Questions. He was forced to apologise last year after calling Mr Balls a "muttering idiot".