Five people have been killed in an ambush-style shooting during a backyard party in suburban Pittsburgh and at least two gunmen are at large, police said.

Four women and a man were killed late Wednesday during the party in the Borough of Wilkinsburg. Allegheny County police said people scrambled toward the house as bullets began flying. Four of the victims were found dead on the back porch. The other one died at a hospital.

Three people were injured and taken to area hospitals. Two men were in critical condition and a woman was stable, police said.

At least two suspects fled on foot. A motive wasn't immediately known.

Lt. Andrew Schurman of the Allegheny County homicide unit says the gunmen barged into the party and opened fire in an ambush-style attack. He said gunshots came from two distinct locations but police don't believe anyone at the party fired back.

"It looks like right now they were all fleeing toward the backdoor of the residence when the second gunman fired from the side of the yard," he said. "They all seemed to get caught on the back porch."

Resident Kayla Alexander told WPXI-TV that she heard a barrage of gunshots — more than 20 — in the neighbourhood, which usually is quiet.

After the shooting, groups of residents gathered on the street, some of them sobbing and saying they lost family members.

Vehicles from the medical examiner's office arrived in the neighbourhood early Thursday to remove the victims' bodies.