A spokeswoman for Allawi, a secular Shia, said she had no information on the incident but confirmed that Allawi, who is challenging the ruling Shia Islamist Alliance bloc at next week's parliamentary election, had been in Najaf on Sunday.
A police captain, speaking on condition of anonymity, said a large crowd of worshippers at the Imam Ali mosque hurled sandals and shoes at Allawi - a grave insult in the Iraqi culture.
A second police officer said some of Allawi's bodyguards fired in the air to disperse the crowd that threw stones, sticks, tomatoes and other projectiles at him. Police intervened to break up the disturbance, he said.
Both policemen said they believed that supporters of Muqtada al-Sadr, the Shia cleric, were responsible for the disturbances, though evidence for this was unclear.
"When Allawi entered the shrine, a few people, believed to be Sadrists, picked up batons and threatened to attack him," the police captain said.
"His American and Iraqi guards fired in the air when everyone started throwing shoes and sandals at him."
Al-Sadr supporters were said to be
responsible for the attack in Najaf
Other witnesses were unclear as to how far armed bodyguards had accompanied Allawi into the shrine, or whether he was accompanied by Westerners, normally barred from such places.
Just after the US invasion of Iraq, in April 2003, a leading Shia cleric was killed in the Imam Ali shrine in circumstances that remain in dispute.
Campaign heats up
On Saturday, Allawi, whose promises to crack down on violence and religious militias have won backing across Iraq's sectarian divide, traded accusations with the ruling Islamists as the campaign heats up for the parliamentary vote on 15 December.
Allawi, who spent 30 years in exile working partly with British and US intelligence after breaking with Saddam Hussein and his Baath party, was named prime minister in mid-2004 by US occupation authorities.
He stepped down in April after an election in January gave a majority to his Islamist rivals.