(CNN) Federal prosecutors have filed hate crime charges against a Pennsylvania man they say stormed a Pittsburgh synagogue and opened fire, killing 11 people.

Robert Bowers, 46, of suburban Baldwin, surrendered to authorities after Saturday morning's shooting at the Tree of Life synagogue. He made anti-Semitic statements during the shooting and targeted Jews on social media, according to a federal law enforcement official.

Live updates: Mass shooting at Pittsburgh synagogue

Bowers faces 29 charges in a rampage that left the historic Jewish neighborhood of Squirrel Hill and the rest of the nation stunned. The attack is believed to be the deadliest on the Jewish community in US history, the Anti-Defamation League said in a statement.

Police respond to the shooting Saturday at the Tree of Life synagogue in Pittsburgh.

"These incidents usually occur in other cities," Pittsburgh Public Safety Director Wendell Hissrich told reporters Saturday. "Today, the nightmare has hit home in the city of Pittsburgh."

Bowers is charged with 11 counts of using a firearm to commit murder and multiple counts of two hate crimes: obstruction of the exercise of religious beliefs resulting in death and obstruction of the exercise of religious beliefs resulting in bodily injury to a public safety officer, authorities said, citing a sealed criminal complaint.

"The crimes of violence are based upon the federal civil rights laws prohibiting hate crimes," said Scott Brady, US Attorney, and Bob Jones, the FBI special agent in charge of the Pittsburgh office, in a statement.

Bowers could face the death penalty if he is convicted of a hate crime.

Six people were injured as a result of the shooting, said Hissrich, four of whom were police officers who responded to the scene. No children were killed, he said.

"The actions of Robert Bowers represent the worst of humanity," Brady said.

Shots fired shortly before 10 a.m.

Saturday morning's violence rocked the city and the neighborhood surrounding the synagogue, which one congregant described as "close-knit."

Jim Waite, who lives across the street, said he walked outside after hearing a commotion. He assumed it was a car accident. A police car flew past him; another officer yelled to get inside. Waite said he then heard more than five -- possibly as many as nine -- shots.

He said he could hear screams from inside the synagogue.

The Allegheny County emergency operations center received calls of an active shooter at 9:54 a.m., Hissrich told reporters. Officers were dispatched a minute later.

The suspect was in the process of leaving when he encountered a Pittsburgh police officer who "engaged him," Jones said. The officer was subsequently injured, and the suspect went back into the synagogue, where he hid from SWAT officers who arrived on the scene.

In all, two police officers and two SWAT officers were wounded in the confrontation, Hissrich said. Three of them were shot, according to the city's public safety department.

The suspect suffered multiple gunshot wounds and was in fair condition at a hospital.

Rapid reaction SWAT members leave the scene of the mass shooting on Saturday.

Investigators recovered a rifle and three handguns from the scene, Jones said. Authorities believe the suspect acted alone. Law enforcement had no knowledge of Bowers prior to the shooting, he said.

Five victims were being treated at two Pittsburgh hospitals, according to Paul Wood, a spokesman for University of Pittsburgh Medical Center. Four victims were being treated at UPMC Presbyterian, and one victim was being treated at UPMC Mercy. Another person was treated at Presbyterian and released.

Social media posts part of investigation

A law enforcement source told CNN that investigators believe an account on Gab, a social media platform, that espoused anti-Semitic views belonged to Bowers.

Its last ominous post was made at 9:49 a.m., just five minutes before police were notified of the shooting.

"I can't sit by and watch my people get slaughtered," Bowers wrote. "Screw your optics, I'm going in."

Bowers' anti-Semitic comments also fueled other hate speech he shared on Gab, which has styled itself as an alternative to Twitter and puts nearly no restrictions on content.

In one post, Bowers claimed Jews were helping transport members of the migrant caravans. He believed that those in the migrant caravans were violent because they were attempting to leave countries that had high levels of violence. And Bowers repeatedly called them "invaders."

"I have noticed a change in people saying 'illegals' that now say 'invaders'," read one post six days before the shooting. "I like this."

Among the vitriolic statements is also criticism of President Donald Trump, who Bowers suggested was surrounded by too many Jewish people.

"Trump is surrounded by k****", "things will stay the course," read one post on Gab, using a derogatory term for Jews.

Roughly four hours before the shooting, Bowers commented in a post that he did not vote for Trump.

In a statement, Gab disavowed "all acts of terrorism and violence" and said its mission was "to defend free expression and individual liberty online for all people."

After being alerted to the suspect's profile on the platform, Gab said it backed up the data, suspended the account and contacted the FBI.

Bowers also posted photos on his Gab account showing his handgun collection, including multiple magazines and sights.

On September 20, Bowers posted images of shooting targets he said were from July 2017. He said he was firing at the targets with a Walther PPQ handgun.

A law enforcement official familiar with the ongoing investigation told CNN that Bowers has a commercial driver's license and a history associated with the trucking industry.

Shooting 'more devastating than originally thought,' Trump says

The FBI will be the lead investigating agency, Hissrich said.

Trump told reporters at Joint Base Andrews in Maryland that the shooting was a "terrible, terrible thing."

"If there was an armed guard inside the temple, they would have been able to stop him," Trump said before boarding a flight to Indianapolis.

After landing, he said, "We're learning a lot about it. It looks definitely like it's an anti-Semitic crime. And that is something you wouldn't believe could still be going on," he said.

Trump previously said in a tweet that the shooting was "far more devastating than originally thought."

The President ordered flags flown at half-staff in honor of the victims.

Security had been a 'major concern'

The Tree of Life synagogue is a Conservative Jewish congregation, according to its website. The synagogue has a Shabbat service at 9:45 a.m. Saturdays, the website said.

Conservative Judaism is one of the major denominations of the religion. The word "conservative" is not a political designation.

Michael Eisenberg, the immediate past president of the Tree of Life congregation, said three congregations -- Tree of Life, New Light and Dor Hadash -- would have been holding simultaneous services in the building on a typical Saturday.

A SWAT police officer and other first responders respond after a gunman opened fire at the synagogue.

There would usually would be about 40 people attending the Tree of Life service in the "main part of the building," Eisenberg said. In the basement below, New Light's service would also have about 30 to 40 people. And the Dor Hadash congregation in the rabbi's study room would have about 15 people, he said.

"On a day like today, the door is open," Eisenberg told CNN affiliate KDKA. "It's a religious service. You could walk in and out. Only on the high holidays is there a police presence at the entrance."

When he was the congregation's president, security was a "major concern," Eisenberg said.

The congregation had worked with the Department of Homeland Security to evaluate its exit routes, he said, and consulted a securities expert at the Jewish Federation about what to do in an active shooter situation.

"We were working with the other synagogues on what to do if something horrific like this happened," he said.

Just a few months ago, Tree of Life Rabbi Hazzan Jeffrey Myers addressed ongoing gun violence and lawmakers' failure to tackle the issue on the congregation's blog.

In the July post, titled, "We Deserve Better," Myers said he was afraid school shootings would continue unless something changed in this year's mid-term elections

"Unless there is a dramatic turnaround in the mid-term elections, I fear ... the status quo will remain unchanged, and school shootings will resume. I shouldn't have to include in my daily morning prayers that God should watch over my wife and daughter, both teachers, and keep them safe," Myers wrote. "Where are our leaders?"

Anti-Semitic incidents in US surged in 2017

A number of other figures and organizations, such as the US Holocaust Memorial Museum, issued statements condemning the violence and extending its sympathy to the victims and their families.

An unidentified woman asks for a status update from firefighters a block away from the shooting.

"The museum reminds all Americans of the dangers of unchecked hatred and anti-Semitism which must be confronted wherever they appear and calls on all Americans to actively work to promote social solidarity and respect the dignity of all individuals," the Holocaust Museum said in a statement.

Pope Francis extended his condolences during a Sunday address, delivered in Italian from the window of the Apostolic Palace at the Vatican.

"May the most high welcome the deceased in his peace, comfort their families and sustain the injured," he said. "We are all wounded by this inhuman act of violence. May the Lord help us to end the outbreaks of hate that develop in our society, reinforcing a sense of humanity, respect for life, moral and civil values and a holy fear of God, who is love and father of all."

In 2017, anti-Semitic incidents in the United States surged nearly 60%, according to the Anti-Defamation League. It found 1,986 cases of harassment, vandalism or physical assault against Jews and Jewish institutions last year.

In a statement Saturday, the ADL said the attack was believed to be the deadliest on the Jewish community in US history.

"It is simply unconscionable for Jews to be targeted during worship on a Sabbath morning," it said, "and unthinkable that it would happen in the United States of America in this day and age."

The Rabbinical Assembly said an act of hate against one community was an act of hate against all.

"This mass murder is a reminder that anti-Semitism is on the rise in America at a rate unprecedented in decades. This vicious hate crime, perpetrated against innocent people at prayer is but the latest in an escalating scourge of hate-based violence in America," it said in a statement.

The Orthodox Union and Rabbinical Council of America issued a joint statement expressing sympathy for the victims of the attack.

"This senseless act of anti-Semitic violence was not only an egregious attack on the Jewish community, but an attack on the very foundations of civil society and our collective democratic values," the Orthodox Union's executive vice president said.