The unusual protest by some 50 people in Shah Alam, the capital of Selangor state, raises new fears of racial tensions in this multiethnic Muslim-majority country where Hindus comprise about 7 percent of the 27 million population.
The demonstrators who marched from a nearby mosque after Friday prayers dumped the cow head outside the gates of the state government headquarters. Selangor adjoins Kuala Lumpur.
Protesters stomped on the head and spat on it before leaving the site, Xavier Jeyakumar, a state government official in charge of non-Muslim affairs, told The Associated Press.
"This is a sign of disrespect, insensitivity and a huge insult to the Indian community," he said.
Such an overt display of religious discord is almost unheard of in Malaysia, which has carefully nurtured racial harmony among its three main ethnic groups, Malay Muslims, Chinese and Indians, since 1969 when the country suffered its worst racial riots.
The demonstrators said their neighborhood, Section 23, has a 90 percent Muslim population and building a Hindu temple there was inappropriate.
"If there is blood you (the government) will be responsible," Malaysiakini, an independent news Web site, quoted a protest leader Ibrahim Haji Sabri as saying.
"I challenge (Selangor government leaders) to go on with the temple construction. I guarantee bloodshed and racial tension," Ibrahim said amid chants of "Allahu Akbar," or God is great, the Malaysian Insider, another news Web site, reported.
Both sites posted pictures of the protest showing a bloodied cow head.
Muslim Malays and the Chinese and Indians — who are Christian, Hindu, Sikh and Muslim — have generally been careful about not offending each others' religions.
But racial tensions have risen in recent years amid complaints by the minorities that their rights are being eroded along with the rising influence of Islamic hard-liners.
Human Resource Minister S. Subramaniam said the incident infuriated Prime Minister Najib Razak, who asked the national police chief to investigate. Witnesses said police stood by and did nothing to stop the protest.
The demonstration, which occurred days before Malaysia celebrates its independence day on Monday, comes amid a new campaign by Najib to promote national integration by emphasizing equality of all races.
"The prime minister said he was very upset over the incident and wants it to be nipped in the bud," Subramaniam said in a statement.
The protesters condemned Chief Minister Khalid Ibrahim of Selangor, one of four states controlled by a three-party opposition coalition that includes an Islamic party. The demonstrators described Khalid, a Muslim, as a traitor to Islam. It was not immediately clear if they were affiliated to any political group.
The Malaysian Insider quoted a protest leader, Mohammad Zurit Bin Ramli, as saying a temple would disturb Muslim practices.
"The temple will disrupt our daily activities like prayers. We cannot concentrate with the sounds coming from the temple," he said.
Associated Press writer Sean Yoong contributed to this report.