A gunman opened fire at the Tree of Life Congregation synagogue in Pittsburgh, Pennsylvania on Saturday, causing multiple fatalities.

The suspected shooter has been taken into custody after surrendering to police officers at the building in the Squirrel Hill area of the city.

At least eight people were killed and several others were wounded, according to CBS-affiliate KDKA. A local law enforcement official told CNN at least 12 people were shot.

“There are fatalities,” said Allegheny County Executive Rich Fitzgerald, but officials have not provided any other details.

Police responded to 911 calls about an active shooter near the synagogue on Wilkins Ave around 10am.

The Pittsburgh force received several calls from people trapped inside the building, where people had been attending a Shabbat prayer service.

According to KDKA reporter Andy Sheehan, police officers said the gunman walked into the building and shouted: “All Jews must die.”

Police officers were shot at by the suspect when the approached the building, forcing them to hide behind vehicles. Three officers were reportedly hit and wounded by the suspect.

Police respond to an active shooter situation at the Tree of Life synagogue (AP)

The area around the building was sealed off and Pittsburgh Public Safety Department told people to stay away.

Police also asked all residents in the Jewish neighbourhood to stay inside their homes during the standoff. Students at the nearby Carnegie Mellon University were sent texts telling them to stay indoors on the campus.

President Donald Trump tweeted about the incident, telling people in the Squirrel Hill area “should remain sheltered”.

The president later told reporters it appeared as if “a wacko” had carried out the shooting. He suggested armed guards should be in place at churches and other religious buildings, and the US needed stiffen up death penalty laws.

Michael Eisenberg, former president of the Tree of Life Synagogue, said several dozen people would having been attending the Saturday prayer service.

“The shooting in Pittsburgh this morning is an absolute tragedy,” said Governor Tom Wolf in a statement.