Federal authorities are investigating the fatal shooting of six people Sunday at a Sikh temple south of Milwaukee, an incident that shocked members of the nation’s close-knit Sikh community.

During a religious service, police said, a man entered the Sikh Temple of Wisconsin in Oak Creek and sprayed automatic-weapon fire, killing four people inside the building and two more outside. He then wounded one police officer before being shot to death by another officer. Three people were injured, including the temple president.

The shootings, which happened about 10:30 a.m. Central time, caused chaos at the 15-year-old temple, with reports of multiple gunmen and of police, in tactical gear and carrying assault rifles, surrounding the building. Police said later that they think the man killed was the only shooter.

Authorities would not identify him, but law enforcement officials described him as a Caucasian man in his late 30s or early 40s who lived in this area of Wisconsin. Federal and state agents are examining his background, including whether he had posted anything on the Internet, said the officials, who spoke on the condition of anonymity because the investigation is unfolding.

A semiautomatic pistol was recovered at the scene, officials said.

The FBI is leading the investigation, with help from the Bureau of Alcohol, Tobacco, Firearms and Explosives and local police. Oak Creek Police Chief John Edwards said the shootings are being “treated as a domestic terrorist-type incident.”

But federal law enforcement officials said it was too early to tell what happened and why.

“Right now, it’s just a mass shooting,” said a federal official who spoke on the condition of anonymity because he was not an authorized spokesman. “What you have is somebody who went into a Sikh temple and opened fire. Who knows what his motivation was.’’

Teresa Carlson, special agent in charge of the FBI’s Milwaukee Division, said that “while the FBI is investigating whether this matter might be an act of domestic terrorism, no motive has been determined at this time.”

The carnage came as the nation is still reeling from a mass shooting two weeks ago in which a gunman killed 12 people and injured 58 at a movie theater in Aurora, Colo. James Holmes, 24, has been charged.

President Obama and his Republican rival in the fall election, Mitt Romney, issued statements Sunday expressing condolences to the victims in Oak Creek and the Sikh community, and Obama met with top federal officials and pledged federal assistance to Wisconsin.

“At this difficult time, the people of Oak Creek must know that the American people have them in our thoughts and prayers,” he said.

Shooting at Sikh temple outside Milwaukee (The Washington Post/Source: Staff reports)

The pain was especially felt among the nation’s more than 500,000 adherents of the Sikh faith, most of whom are first- or second-generation immigrants from India, where Sikhism was founded several centuries ago.

Sikh men tend to stand out because of their beards and colorful turbans, which are ritually wrapped around uncut hair, and leaders in the community say they are sometimes confused with Muslims and viewed with suspicion. After the attacks of Sept. 11, 2001, there were scattered reports nationwide of harassment or attacks on Indian Sikhs, including the killing of an unarmed man in Phoenix.

Temple members said that a day they hoped would begin with prayer quickly turned to tragedy.

Neal Gill, who owns a gas station, was driving to the temple when a friend called his cellphone and told him about the shootings. He spent the day across the street from the temple waiting with worried friends. By evening, some still did not know the fate of their loved ones.

“This guy, he’s still crying about he can’t find his wife,” Gill said. “The Sikh community is a very peaceful community. I don’t know why he did it.”

Gill said he did not know whether to call the perpetrator a terrorist. But he knows this: “Sick person, sick person, I can say.”

Gill’s father-in-law, J.S. Brar, was visiting from India and was with the family.

“No reason,” Brar said. “These poor people that lost their lives, there’s no reason for it. Just a crazy man. Otherwise there was no cause at all.”

Head priest Gurmel Singh was inside the building during the shootings. He was hobbled by grief and had to be supported as he walked. His brother-in-law, Parkash Singh, who was also a priest, was among those killed. He had only recently brought his family to the United States from India, Gurmel Singh said.

“He’s dead,” Singh said. “Two children and a wife here.”

He added: “I’m here for 15 or 16 years in the USA. And at this temple, maybe five years. There are no problems. First time problem.”

Members of the Sikh community gathered near the temple Sunday evening, rushing from around the Milwaukee area and beyond to come to the aid of family and friends and to seek information, which was scarce.

“People are scared. They want to know what’s happening,” said Balbir Singh, a restaurateur who drove from nearby Brookfield. “We are the same community. . . . It’s never happened, something like that before, in the church especially.”

Charan Bedi rushed to the temple from Chicago, about 80 miles south, when he heard about the shootings. Family members who attend the temple were safe, but family friends were harmed.

“It’s a small community, so we know all of them,” Bedi said. “A loss between any family is a loss for all of us. The main question is, why? We are a peace-loving community. There is no crime. We’re not sure if they mistook us for someone else or what.”

About 50,000 Sikhs live in the Baltimore-Washington region. Bhai Gurdarshan Singh, the high priest of a Sikh temple in Gaithersburg, was about to begin services Sunday morning when he was pulled aside and told of the shootings. He immediately informed his congregants and led them in a prayer for the victims.

“We are literally hurt, and we pray for the families,” he said.

Other congregants stepped out into the lobby to learn more on their smartphones, and some were particularly alarmed that the shootings took place while Sunday-school classes were going on.

“It makes you question your own safety as an American in your own country,” said Daman Kaur, 26, of Frederick.

This year marks the 100th anniversary of the first Sikh temple in the United States. The Sikh Temple of Wisconsin was established in 1997 with 20 to 25 families. There are now 350 to 400 people in the congregation, according to the temple’s Web site.

Law enforcement officials released few details about Sunday’s shootings and would not say how many people were inside the temple at the time. Edwards said the officer who was injured, a 20-year veteran, was helping a victim outside when he was “ambushed” and shot multiple times. Another officer then shot and killed the gunman, he said, adding that the officers’ actions were “heroic.’’

“It stopped a tragic event that could have been a lot worse,” Edwards said.

Markon reported from Washington. Annys Shin and Julie Tate in Washington contributed to this report.