(Updated Monday)

Terrified worshippers hid in cupboards and others desperately texted friends outside for help as a man gunned down killed six people in a deadly rampage at a Sikh temple.

The gunman was later killed outside the Wisconsin temple in a shoot-out with police.

Police in Oak Creek, a suburb of Milwaukee, called yesterday's attack an act of domestic terrorism, but did not provide any details about the gunman or suggest a possible motive.

Police Chief John Edwards did not say whether the attacker specifically targeted the Sikh community.

During a chaotic few hours after the first shots were fired, police in tactical gear armed with assault rifles surrounded the Sikh Temple of Wisconsin with armoured vehicles and ambulances.

At one point witnesses feared several gunmen were holding women and children hostage inside.

One of the first officers to respond to frantic emergency calls seeking help was shot several times as he tended to a wounded victim and was in a critical condition, along with two other victims, authorities said.

"We never thought this could happen to our community," said Devendar Nagra, 48, whose sister escaped injury by hiding as the gunman opened fire in the temple's kitchen. "We never did anything wrong to anyone."

Mr Edwards said the FBI would lead the investigation because the shootings were being treated as domestic terrorism, or an attack that originated inside the US.

He said authorities would not say any more about their investigation until later today, including the names of those killed.

But it appeared the investigation had moved beyond the temple, as police and federal agents swarmed a neighbourhood in nearby Cudahy, evacuating several homes and sealing off four blocks around a house.

FBI agents were on the scene with an armoured truck and other vehicles. Milwaukee County sheriff's spokeswoman Fran McLaughlin said the department's bomb squad also was on the scene, though she had no details about why the unit had been called.

Jatinder Mangat, 38, said his uncle Satwant Singh Kaleka, the temple's president, was one of those shot at the temple. When he later learned people had died, Mr Mangat said "it was like the heart just sat down."

"This shouldn't happen anywhere," he said.

Mr Edwards said the gunman "ambushed" one of the first officers to arrive at the temple as the officer, a 20-year veteran with tactical experience, tended to a victim outside. A second officer then exchanged gunfire with the suspect, who was fatally wounded.

Tactical units went through the temple and found four people dead inside and two outside, in addition to the gunman.

The three wounded were being treated at an area trauma centre. Greenfield police chief Bradley Wentlandt, who assisted the investigation, said the police officer had surgery and was expected to survive.

Gurpreet Kaur, 24, said her mother and a group of about 14 other women were preparing a meal in the temple kitchen when the gunman entered and started firing.

Ms Kaur said her mother felt two bullets fly by as the group fled to the pantry. Her mother suffered what Kaur thought was shrapnel wound in her foot.

"These are people I've grown up with," she said. "They're like aunts and uncles to me. To see our community to go through something like this is numbing."

Many Sikhs in the US worship on Sundays at a temple, or gurdwara, and a typical service consists of meditation and singing in a prayer room where worshippers remove their shoes and sit on the floor. Worshippers gather afterwards for a meal that is open to community members, regardless of their religious beliefs.

Sikhism is a monotheistic faith founded more than 500 years ago in south Asia, with about 27 million followers worldwide.

Observant Sikhs do not cut their hair; male followers often cover their heads with turbans - which are considered sacred - and refrain from shaving their beards. There are about 500,000 Sikhs in the US, according to estimates. The majority worldwide live in India.

Sikh groups have reported a rise in hate attacks since the September 11 2001 terrorist atrocity. The Washington-based Sikh Coalition has reported more than 700 incidents in the US since 9/11, which advocates blame on anti-Islamic sentiment.

Sikhs do not practise the same religion as Muslims, but their long beards and turbans often cause them to be mistaken for Muslims, advocates say.

Police in New York and Chicago issued statements saying they were giving Sikh temples in those cities additional attention as a precaution after the shooting, which comes two weeks after a gunman killed 12 people at a cinema in Colorado.

Teresa Carlson, special agent in charge with the FBI's Milwaukee division, said today: "While the FBI is investigating whether this matter might be an act of domestic terrorism, no motive has been determined at this time."

President Barack Obama said he and his wife Michelle were "deeply saddened" by the killings and promised his administration would provide "whatever support is necessary" to those investigating the shooting.

"At this difficult time, the people of Oak Creek must know that the American people have them in our thoughts and prayers, and our hearts go out to the families and friends of those who were killed and wounded," Mr Obama said in a statement issued by the White House.

"As we mourn this loss which took place at a house of worship, we are reminded how much our country has been enriched by Sikhs, who are a part of our broader American family."

Mitt Romney, the likely Republican challenger for the US presidency, said: "This was a senseless act of violence and a tragedy that should never befall any house of worship.

"Our hearts are with the victims, their families, and the entire Oak Creek Sikh community. We join Americans everywhere in mourning those who lost their lives and in prayer for healing in the difficult days ahead."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.