Police respond to an active shooter situation at the Tree of Life synagogue on Wilkins Avenue in the Squirrel Hill neighborhood of Pittsburgh, Pa., on Saturday, October 27, 2018.

Police said a suspect was in custody after the attack at the Tree of Life Congregation in Pittsburgh's Squirrel Hill neighborhood. A law enforcement official identified the suspect as Robert Bowers and said he is in his 40s. The official wasn't authorized to discuss an ongoing investigation and spoke to The Associated Press on condition of anonymity.

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

A shooter opened fire during a baby naming ceremony at a Pittsburgh synagogue on Saturday, and people with knowledge of the investigation said at least 10 people were killed.

City officials said the shooting was being investigated as a federal hate crime. It comes 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.

The shooting also immediately reignited the longstanding national debate about guns: President Donald Trump said synagogues and churches should have armed guards, while Pennsylvania's Democratic governor said that "dangerous weapons are putting our citizens in harm's way."

The people who provided the death toll spoke to The Associated Press anonymously because they were not authorized to speak publicly about the shooting.

"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, the Pittsburgh public safety director.

The attack took place during a baby naming ceremony, according to Pennsylvania Attorney General Josh Shapiro. It was unknown whether the baby was harmed.

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.

Trump called the shooting "far more devastating than anyone thought," saying "it's a terrible thing what's going on with hate in our country."

Trump also said the outcome might have been different if the synagogue "had some kind of protection" from an armed guard and suggested that might be a good idea for all churches and synagogues.

Gov. Tom Wolf called the shooting an "absolute tragedy" in a statement that made reference to calls for tighter gun control laws.

"We must all pray and hope for no more loss of life," Wolf said. "But we have been saying "this one is too many" for far too long. Dangerous weapons are putting our citizens in harm's way."

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

"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."

In 2010, Tree of Life Congregation -- founded more than 150 years ago -- merged with Or L'Simcha to form Tree of Life (asterisk) Or L'Simcha.

The synagogue is a fortress-like concrete building, its facade 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.

"I ran out of the house without changing and I saw the street blocked with police cars. 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. I am just waiting to see," Eisenberg said.

He 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.

"I spoke to a maintenance person who was in the building and heard the shots. He was able to escape through one of the side exit doors we had made sure was functioning," Eisenberg said.

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."

"This should not be happening, period," he told reporters at the scene. "This should not be happening in a synagogue."

Just three days before the shooting, Rabbi Jeffrey Myers posted a column on the congregation's website, noting that people make time to attend funerals, but not for life's happy occasions.

"There is a story told in the Talmud of a wedding procession and a funeral procession heading along parallel roads, with the roads intersecting," Myers wrote on Wednesday. "The question asked is: when they meet at the fork, which procession goes first, funeral or wedding? The correct answer is wedding, as the joy of the couple takes precedence. In fact, the funeral procession is to move out of sight so that their joy is not lessened."

Myers ended his column with words that now seem all too prescient.

"We value joy so much in Judaism that upon taking our leave from a funeral or a shiva house, the customary statement one makes (in Yiddish) is `nor oyf simches' - only for s'machot," Myers wrote. "While death is inevitable and a part of life, we still take our leave with the best possible blessing, to meet at joyous events. And so I say to you: nor oyf simches!"