Updated

An emergency call that brought two police officers to a home where they were ambushed, and where a third was also killed later during a four-hour siege, was precipitated by a fight between the gunman and his mother over a dog urinating in the house.

The Saturday argument between Margaret and Richard Poplawski escalated to the point that she threatened to kick him out and she called police to do it, according to a 12-page criminal complaint and affidavit filed late Saturday.

Click here for photos.

When officers Paul Sciullo II and Stephen Mayhle arrived, Margaret Poplawski opened the door and told them to come in and take her 23-year-old son, apparently unaware he was standing behind her with a rifle, the affidavit said. Hearing gunshots, she spun around to see her son with the gun and ran to the basement.

"What the hell have you done?" she shouted.

The mother told police her son had been stockpiling guns and ammunition "because he believed that as a result of economic collapse, the police were no longer able to protect society," the affidavit said.

Friends have said Poplawski was concerned about his weapons being seized during Barack Obama's presidency, and friends said he owned several handguns and an AK-47 assault rifle. Police have not said, specifically, what weapons were used to kill the officers.

Autopsies show Sciullo, 37, died of wounds to the head and torso. Mayhle, 29, was shot in the head.

A witness awakened by two gunshots told investigators of seeing the gunman standing in the home's front doorway and firing two to three shots into one officer who was already down. Sciullo was later found dead in the home's living room, and Mayhle near the front stoop, police said.

A third officer, Eric Kelly, 41, was killed as he arrived to assist the first two officers. Kelly was in uniform but on his way home when he responded and was gunned down in the street.

Kelly's radio call for help summoned other officers, including a police commando team. The ensuing standoff included a gun battle in which police say Richard Poplawski tried to kill other officers.

Saturday's slayings occurred just two weeks after four police officers were fatally shot in Oakland, California, in the deadliest day for U.S. law enforcement since the Sept. 11, 2001, terrorist attacks.

Poplawski is charged with three counts of criminal homicide and nine counts of attempted homicide — one each for the eight officers who were shot at in an armored police vehicle, plus a ninth who was shot in the hand as he tried to help Kelly.

Poplawski also was charged with possessing an instrument of crime: the bulletproof vest he wore during the gun battle. The criminal complaint does not say how Poplawski obtained the vest.

Police Chief Nate Harper Jr. has said the vest kept Poplawski from being more seriously wounded, but police have not specifically said how many shots were stopped by the vest.

A district judge arraigned Poplawski at UPMC Presbyterian Hospital, an arraignment court worker told The Associated Press on Sunday. Poplawski was being treated there for gunshot wounds to his extremities and remains under guard. Police and hospital officials have not released his condition, though he is expected to survive.

It was not immediately clear if Poplawski has an attorney. A preliminary hearing, at which Poplawski could challenge the charges, was not immediately scheduled.

Poplawski is also charged with firing weapons into two occupied neighboring homes and with recklessly endangering four people, two in each home, with gunfire. No civilians were wounded.

Police did not immediately say why Poplawski fired toward the homes, but some officers were seen going into nearby homes and perching on rooftops.

Investigators continued to work at the home Sunday. A large piece of wood covered the entire entryway, a picture window was shattered, bullet holes could be seen in the living room walls and several bullet marks scarred the facade and window frames.

Poplawski had feared "the Obama gun ban that's on the way" and "didn't like our rights being infringed upon," said Edward Perkovic, his best friend.

Perkovic, 22, said he got a call at work from him in which he said, "Eddie, I am going to die today. ... Tell your family I love them and I love you."

Perkovic said: "I heard gunshots and he hung up. ... He sounded like he was in pain, like he got shot."

Another longtime friend, Aaron Vire, 23, said Poplawski feared that Obama was going to take away his rights, though he said he "wasn't violently against Obama."

Obama has said he respects Americans' constitutional right to bear arms, but that he favors "common sense" gun laws. Gun rights advocates interpret that as meaning he would approve some curbs on assault and concealed weapons.

Poplawski had been laid off from his job at a glass factory earlier this year, said another friend, Joe DiMarco. DiMarco said he didn't know the name of the company, but knew his friend had been upset about it.

Police did not immediately release any information on funeral arrangements for the officers, though a memorial was held Saturday night outside the police station where all three slain officers worked.