A gunman, badly wounded in a shootout with police, forced his way into a Northeast Washington home last night and, while five persons cowered in terror, held off police for more than 3 hours before he was captured.

The chilling drama at 1056 48th St. NE in the residential neighborhood of Deanwood finally ended at 9:05 p.m. when police slipped through the back door and found the gunman collapsed on the living room couch, semi-conscious from of blood

The policemen seized a man identified as William Harrington, 38, accused of having shot Officer Raymond J. Hackett with the officer's own gun 3 1/2 hours eariler in front of a home at 1031 47th Pl. NE.

After grabbing Hackett's gun, which was lying on the floor next to the wounded man, police rushed up the stairs to the second floor of the house and free John Cunningham Sr. and four of his children -- Willie, 17; Michelle, 16, John Jr., 13, and Vermadee, 11 -- who had locked themselves in a bedroom.

"We were really scared," said John Cunningham Sr. following his release. "I didn't believe this guy was serious about hurting us, but when he got on the telephone and started asking police to send him some drugs, I got real worried.

"I said to myself if this guy is a junkie, then he'll do anything," said Cunningham.

Police said the gunman apparently did not know that the five Cunninghams were in the house when he barged through a back door about 5:30 p.m.

Minutes earlier, the gunman had been shot in the left side in an exchange of gunfire with police in front of the 47th Place address, a block from the Cunningham home.

Officers Hackett and Ernest Jefferson were on routine patrol when they spotted two men who apparently were burglarizing a home in the area, according to police.

Hackett struggled with the man who later was found in the Cunningham home, and the man managed to grab Hackett's service revolver. He then fired two shots at the officer, hitting him in the right side of his right hand, just below his little finger. The bullet exited from the left side of Hackett's hand and grazed his chest, police said.

Jefferson returned the gunfire and hit the suspect in the left side, police said. The second burglary suspect escaped.

Police said the wounded man then ran down an alley toward the Cunningham home and through the back gate as Mrs. Cunningham and another of her sons, Tyrone, were leaving the house.

Police immediately surrounded the house and began calling repeatedly over bullhorns for Harrington to surrender.

For more than three hours, about 50 D.C. police barricade unit officers, some armed with high-powered rifles some armed with tear gas grenade launchers, maintained the seige at the two-story, brown-shingled house.

But police said the gunman, who did not resist when he was captured, only occasionally responded to their pleadings and at times seemed listless and uninterested in the negotiations, apparently because of his continuing loss of blood.

A trained police negotiator talked with the gunman on the telephone as well and at one point the gunman said. "Get my girlfriend to get some drugs for me. She knows what to get and where to get it." After informing police that he had been shot, the gunman laid down the receiver and refused to to talk for a while.

Police said the girlfriend was summoned to the scene to attmept to talk to her boyfirend, but that she was not sent to get any drugs.

After repeated attempts to get the gunman to surrender had failed, Officer James Hunt of the barricade unit went to the front window of the home and tried to talk to him. It was then that the six other policemen sheaked in through the back door and the standoff ended.

Several hundred Deanwood residents watched from behind barricades and from their homes as police tried to coax the gunman out of the house.

The gunman was treated for his wound in the blood-covered living room of the home and the onlookers cheered as he was brought out of the home on a stretcher.

Police said Harrington, 38, of 1029 48th St. NE has been charged with assault on a police officer and burglary. He was listed in critical condition early today in the lockup ward of D.C. General Hospital.

Officer Hackett, 32, an 8-year-veteran of the force was in good condition at the Washington Hospital Center. Dr. Samuel Mitchell, who examined Hackett said that the bullet had caused nerve, ligament and bone damage to his hand.

Numerous Deanwood residents congratulated police Chief Burtell M. Jefferson for concluding the house takeover without any gunfire.

Candies L. Cook, who lives across the street and watched as the Cunninghams were freed, said simply, "I've been praying and praying and God answered our prayers." CAPTION: Picture 1, Suspect wounded in the siege was taken to D.C. General Hospital. By Lucian Perkins -- The Washington Post; Picture 2, About 50 police surrounded a Northeast home a where a wounded gunman barricaded himself.; Picture 3, John Cunningham and four of his children, who hid in a bedroom. From left are Cunningham, Willie, Vermadee, John Jr. and Michelle. By Lucian Perkins -- The Washington Post