A shooter opened fire during a baby naming ceremony at a synagogue in Pittsburgh, Pa., on Saturday and killed 11 people in an attack U.S. officials are investigating as a hate crime.

At least six other people were wounded, including four police officers who dashed to the scene, authorities said. No children were among the dead.

Police said a suspect, 46-year-old Robert Bowers, was in custody after the attack at the Tree of Life Congregation in Pittsburgh's Squirrel Hill neighbourhood. The suspect was taken to hospital and is in fair condition with multiple gunshot wounds, a local official said.

The gunman shouted "All Jews must die" when he stormed the synagogue, according to local media and authorities.

Bob Jones, the special agent in charge of the Federal Bureau of Investigation's office in Pittsburgh, said Bowers was not known to law enforcement and that investigators believe he was acting alone. The gunman used an assault rifle and three handguns in the attack, he said.

Police vehicles are deployed near the vicinity of the home of Pittsburgh synagogue shooting suspect Robert Bowers in Baldwin, Pa., on Saturday. (John Altdorfer/Reuters)

"This is the most horrific crime scene I have seen in 22 years of police work," Jones said. "They were brutally murdered simply because of their faith."

Federal prosecutors charged Bowers on 29 counts, including using a firearm to commit murder.

Scott W. Brady, the U.S. Attorney for the Western District of Pennsylvania, announced the charges late Saturday.

A news conference was scheduled Sunday to discuss the charges.

Thousands of people attended a vigil in Pittsburgh Saturday evening for the victims of the shooting. (Gene J. Puskar/Associated Press)

U.S. Attorney General Jeff Sessions had earlier said the Justice Department would file hate crime and other criminal charges against the gunman that could lead to the death penalty.

"Hatred and violence on the basis of religion can have no place in our society," he said.

Thousands of people attended a vigil in Pittsburgh Saturday evening for the victims of the shooting.

Watch a witness to the shooting describe what she saw:

A witness describes what happened at fatal shooting at a Pittsburgh synagogue on Saturday. 1:52

The killings come amid a rash of high-profile attacks in an increasingly divided country, including the series of pipe bombs mailed over the past week to prominent Democrats and former officials.

Pittsburgh's Jewish community was shocked by the attack.

"Growing up ... you hear about the Holocaust and you hear stories about other places, but you can't imagine it would ever happen in your neighbourhood," Drew Barkley, executive director of Temple Sinai, another Pittsburgh synagogue, told CBC News.

"It's shocking ... We don't know why anti- Semitism exists the way it does ... It's such an ancient hatred."

Far-right social media presence

The social media site Gab.com said the alleged shooter had a profile on its website, which is popular with far-right extremists. The company said the account was verified after the shooting and matched the name of the gunman.

A man with the same name posted on Gab before the shooting that "HIAS likes to bring invaders in that kill our people. I can't sit by and watch my people get slaughtered. Screw your optics, I'm going in."

The Tree of Life Synagogue is in the Squirrel Hill neighbourhood, about 10 minutes away from downtown Pittsburgh. (CBC News)

HIAS is a nonprofit group that helps refugees around the world find safety and freedom. The organization says it is guided by Jewish values and history.

Bowers also recently posted a photo of a collection of three semi-automatic handguns he titled "my glock family," a reference to the firearms manufacturer. He also posted photos of bullet holes in person-sized targets at a firing range, touting the "amazing trigger" on a handgun he was offering for sale.

Gun debate

The shooting immediately reignited the longstanding national debate about guns: U.S. President Donald Trump said the outcome might have been different if the synagogue "had some kind of protection" from an armed guard, while Pennsylvania's Democratic Gov. Tom Wolf noted that once again, "dangerous weapons are putting our citizens in harm's way."

"It is a very horrific crime scene. It's one of the worst that I've seen and I've been on some plane crashes," said a visibly moved Wendell Hissrich, Pittsburgh's public safety director.

Watch U.S. President Donald Trump react to the shooting:

U.S. President Donald Trump says "something has to be done" about hate in the country in the wake of the deadly shooting at a Pittsburgh synagogue, which is "far more devastating than everybody originally thought." 6:27

The synagogue is located in the tree-lined residential neighborhood of Squirrel Hill, about 10 minutes from downtown Pittsburgh and the hub of Pittsburgh's Jewish community.

Jonathan Greenblatt, chief executive officer of the Anti-Defamation League, said the group believes it is the deadliest attack on the Jewish community in U.S. history.

"Our hearts break for the families of those killed and injured at the Tree of Life Synagogue, and for the entire Jewish community of Pittsburgh," he said.

International reaction

International reaction poured in Saturday afternoon. Canadian Prime Minister Justin Trudeau said on Twitter: "Canadians' hearts are with the Jewish community in Pittsburgh today, as they endured a horrific anti-Semitic attack while at prayer."

Israeli Prime Minister Benjamin Netanyahu said he was "heartbroken and appalled" by the attack.

2/3 We have not received information that suggests an increased security threat in Canada. That said, it is important that our community remain vigilant and follow existing security protocols. If you see something, call police. —@CIJAinfo Want the Jewish community in <a href="https://twitter.com/hashtag/SquirrelHill?src=hash&ref_src=twsrc%5Etfw">#SquirrelHill</a> <a href="https://twitter.com/hashtag/Pittsburgh?src=hash&ref_src=twsrc%5Etfw">#Pittsburgh</a> to know that they are not alone. Jews in Canada and around the world are praying for you and the first responders who came to your aid. We stand together in the aftermath of this horrific act of <a href="https://twitter.com/hashtag/Antisemitism?src=hash&ref_src=twsrc%5Etfw">#Antisemitism</a>. <a href="https://t.co/3yjPJLJQsq">https://t.co/3yjPJLJQsq</a> —@LevittMichael

"The entire people of Israel grieve with the families of the dead," Netanyahu said. "We stand together with the Jewish community of Pittsburgh. We stand together with the American people in the face of this horrendous anti-Semitic brutality. And we all pray for the speedy recovery of the wounded."

World Jewish Congress president Ronald S. Lauder called the shooting "an attack not just on the Jewish community, but on America as a whole."

Canadians’ hearts are with the Jewish community in Pittsburgh today, as they endured a horrific anti-Semitic attack while at prayer. May the families of those murdered be comforted, and may the injured recover quickly and fully. —@JustinTrudeau I was heartbroken and appalled by the murderous attack on a Pittsburgh synagogue today: <a href="https://t.co/NBMO31lMU2">pic.twitter.com/NBMO31lMU2</a> —@netanyahu

Trump called the shooting a "wicked act of mass murder" that "is pure evil, hard to believe and frankly something that is unimaginable."

Trump has at times been accused by critics of failing to adequately condemn hate, such as when he blamed "both sides" for the violence at a Charlottesville white supremacist rally.

On Saturday, he said that anti-Semitism "must be confronted anywhere and everywhere it appears."

'Surreal scene'

The synagogue is a fortress-like concrete building. Its facade is punctuated by rows of swirling, modernistic stained-glass windows illustrating the story of creation, the acceptance of God's law, the "life cycle" and "how human-beings should care for the earth and one another," according to its website. Among its treasures is a "Holocaust Torah" rescued from Czechoslovakia.

Its sanctuary can hold up to 1,250 guests.

Michael Eisenberg, the immediate past president of the Tree of Life Synagogue, lives about a block from the building.

He was getting ready for services when he received a phone call from a member who works with Pittsburgh's Emergency Services, saying he had been notified through scanner and other communications that there was an active shooter at their synagogue.

Police exchanged fire with the shooter before persuading him to surrender and taking him into custody. (Pam Panchak/Pittsburgh Post-Gazette/Associated Press)

"I ran out of the house without changing and I saw the street blocked with police cars," Eisenberg said. "It was a surreal scene. And someone yelled, 'Get out of here.' I realized it was a police officer along the side of the house.

"I am sure I know all of the people, all of the fatalities," he went on. "I am just waiting to see."

Eisenberg said officials at the synagogue had not gotten any threats that he knew of prior to the shooting. The synagogue maintenance employees had recently checked all of the emergency exits and doors to make sure they were cleared and working.

Jeff Finkelstein of the Jewish Federation of Greater Pittsburgh said local synagogues have done "lots of training on things like active shooters, and we've looked at hardening facilities as much as possible."