The gunman who killed six people inside a Sikh temple in the US and was killed in a police shootout was 40-year-old US army veteran Wade Michael Page, officials have said.
Civil rights group identified him as a "frustrated neo-Nazi" who led a white supremacist band.
Police called Sunday's attack in a Milwaukee-area Sikh temple an act of domestic terrorism.
Page joined the Army in 1992 and was discharged in 1998, according to a US defence official who spoke on condition of anonymity because he was not authorized to release information about the suspect.
Officials and witnesses said the gunman walked into the Sikh Temple of Wisconsin and opened fire as several dozen people prepared for Sunday morning services.
Six were killed, and three were critically wounded.
Page told a white supremacist website in an interview in 2010 that he had been part of the white power music scene since 2000, when he left his native Colorado and started the band, End Apathy, in 2005, the civil rights organization said.
He told the website his "inspiration was based on frustration that we have the potential to accomplish so much more as individuals and a society in whole," according to the SPLC. He did not mention violence in the interview.
Page joined the military in 1992 and was a repairman for the Hawk missile system before switching jobs to become one of the Army's psychological operations specialists, according to the defence official.
So-called "Psy-Ops" specialists are responsible for the analysis, development and distribution of intelligence used for information and psychological effect; they research and analyze methods of influencing foreign populations.
Fort Bragg, North Carolina, was among bases where Page served.
Joseph Rackley of North Carolina told The Associated Press that Page lived with his son for about six months last year in a house on Mr Rackley's property.
Wade was bald and had tattoos all over his arms, Mr Rackley said, but he does not remember what they depicted.
He said he was not aware of any ties Page may have had to white supremacists.
Witnesses to Sunday's shooting said the gunman looked like he had a purpose and knew where he was going.
Satpal Kaleka, wife of the temple's president, Satwant Singh Kaleka, saw the gunman enter, according to Harpreet Singh, their nephew.
"He did not speak, he just began shooting," said Singh, relaying her description.
Worshippers said they had never seen the man at the temple before.
"We never thought this could happen to our community," said Devendar Nagra, 48, whose sister escaped injury by hiding as the gunman fired in the temple's kitchen. "We never did anything wrong to anyone."
Oak Creek Police Chief John Edwards said the FBI will lead the investigation because the shootings are being treated as domestic terrorism, or an attack that originated inside the US.
Mr Edwards said the gunman "ambushed" one of the first officers to arrive at the temple as the officer tended to a victim outside. A second officer then exchanged gunfire with the suspect, who was fatally shot.
The wounded officer was in critical condition along with two other victims Sunday night, authorities said. Police said the officer was expected to survive.
Tactical units went through the temple and found four people dead inside and two outside, in addition to the shooter.
Jatinder Mangat, 38, another nephew of the temple's president, said his uncle was among those shot, but he did not know the extent of his injuries. When Mr Mangat later learned people had died, he said "it was like the heart just sat down."
Gurpreet Kaur, 24, said her mother was among a group of about 14 other women preparing a meal in the temple kitchen when the gunman entered and started firing.
Mr Kaur said her mother felt two bullets fly by her as the group fled to the pantry. Her mother suffered what Mr 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 afterward for a meal that is open to the entire community.
Sikhism is a monotheistic faith founded more than 500 years ago in South Asia. It has roughly 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 roughly 500,000 Sikhs in the US, according to estimates. The majority worldwide live in India.
Sikh rights groups have reported a rise in bias attacks since the 11 September, 2001, terrorist attacks.
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 are not 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.
Valarie Kaur, who chronicled violence against Sikh Americans in the 2006 documentary "Divided We Fall," said the shootings reopened wounds in a community whose members have found themselves frequent targets of hate-based attacks since Sept. 11.
"We are experiencing it as a hate crime," she said. "Every Sikh American today is hurting, grieving and afraid."