Two people were killed in a shooting at a psychiatric institute at the University of Pittsburgh Medical Center on Thursday, and one of the dead was believed to be the shooter, the hospital said.

Seven people were wounded in the shooting at the Western Psychiatric Institute and Clinic, UPMC said in a Twitter posting. Police have told us there were 9 total victims ... 2 of whom have been confirmed dead, UPMC said on Twitter.

According to police, 1 of 2 confirmed dead ... is believed to be the shooter.

An unidentified official said a University of Pittsburgh police officer shot the gunman, the Pittsburgh Post-Gazette reported. The newspaper also reported that a UPMC police officer had been grazed in the leg by a bullet.

Western Psychiatric Institute treats more than 25,000 children, adolescents and adults a year for a range of disorders including Alzheimer's disease, depression, schizophrenia and substance abuse, according to its website.

Eyewitnesses said on Twitter they could see children being carried out of the institute by staff members and taken to waiting vehicles.

The shooting was first reported at about 2 p.m. (1900 GMT). Earlier reports of a second shooter were inaccurate, UPMC said.

Streets surrounding the institute in Pittsburgh's Oakland neighbourhood were cordoned off. Police could be seen going into the institute with bomb-sniffing dogs, one eyewitness said.

UPMC spokeswoman Allison Schlesinger said shooting victims were taken to the nearby UPMC Presbyterian Emergency Room.

Joe Avia, a security guard at Presbyterian, said the scene at the hospital following the shooting was chaotic.

I was not prepared for this at all, Avia said.

A media briefing was scheduled for the early evening.

(Reporting by Ellen Wulfhorst, additional reporting by Matt Stroud and Jason Cohn; editing by Daniel Trotta and Todd Eastham)