A standoff lasting nearly nine hours ended Sunday morning when police in Lanham apprehended an armed man who they say had destroyed belongings in his residence and threatened a police officer with a gun.

Prince George’s County police received a call about midnight from a resident of the 9500 block of Wellington Street who heard crashes and thought there might be a burglary in progress at a neighbor’s house. When officers arrived, they found one person inside the home.

Police officers summoned a conflict management team, which formed a barricade around the house and attempted to negotiate with the inhabitant. Several neighbors said authorities instructed them not to leave their homes.

The man inside the home continued to act destructively while the police were outside. He threw household objects, including a television, out the windows. By morning, items were strewn across the lawn, and most of the windows were broken. Police think the man was under the influence of PCP.

About 9 a.m., the man jumped about 11 feet out of a window in the back of the house. He displayed a semiautomatic pistol and threatened a police officer, who fired at him and missed. The man ran away, jumping over a fence and heading down 96th Avenue, a road that runs perpendicular to Wellington Street, police said.

A police dog pursued the man for about a hundred yards. The dog bit the gunman’s right arm, officials say, and held on until police caught up and apprehended him.

Assistant Chief Kevin Davis focused on the role that the dog, a 4-year-old Belgian Malinois named Rambo, played in the man’s arrest.

“These dogs are heroes in their own right,” he said about the police department’s K-9 unit. “Prince George’s County leads the nation in the way we train our K-9 dogs. . . . This is just an epitome of why training pays off.”

The man was taken to a hospital to be treated for the dog bite and any effects of narcotic use. Davis said he will be charged with assaulting a police officer and other crimes.

Davis said that the man was a resident of the house but not the homeowner. Davis could not provide the man’s name because the man identified himself by several false names during the night-long confrontation, he said. He did not know whether the man was related to the homeowner or whether he lived in the house alone or with others.

“It’s just completely erratic behavior,” Davis said of the man. He noted that the man cut his hand on the windows he broke, bleeding heavily without seeming to care and later jumped out of a second-story window. Davis attributed these actions to PCP use.

“This guy, at the end of the day, I don’t even know if he’ll remember this,” he said.