Prince George’s County police on Wednesday evening used a Taser to subdue a naked man who authorities said had just shot his childhood friend in the head in what they called an unprovoked attack brought on by the hallucinogenic drug PCP.

Moments after the shooting, police said at a news conference Thursday, the suspect stripped, climbed atop a fire department hook-and-ladder truck in a supermarket parking lot in Calverton and began shouting profanities, screaming that he was “going to kill everyone.”

The 10-minute rant by Mohamed Sulaiman Bah, 24, and his arrest were captured on video, posted on YouTube and broadcast on television stations.

Police defended the use of the Taser. They said that Bah was violent and that taking him down by other means probably would have injured him and officers.

Police said they could not say why Bah allegedly shot his friend. “PCP is the only true motive we can find for this unprovoked attack,” said Capt. Harold Simms, commander of the northern regional investigation division.

The friend, whom police did not identify, was in critical condition at a trauma center; Simms said it appeared he would survive.

Bah, of Castle Ridge Circle in Silver Spring, was charged with more than a dozen crimes, including attempted first- and second-degree murder, assault, reckless endangerment, resisting arrest and multiple handgun violations. He was ordered held without bail until a June 11 hearing.

Police said in charging documents that Bah and his friend were in a silver Honda driven by another man in the 11900 block of Beltsville Drive, on their way to Silver Spring. The driver, who was not injured, told police that Bah “was acting very strangely in that he was screaming randomly and appeared very agitated.”

About 6 p.m., the driver told police that Bah, who was in the front passenger seat, turned toward the victim, sitting directly behind him. The driver said he heard a single gunshot. Police said the victim was struck once in the forehead between his eyes with a .38-caliber revolver.

At that moment, Bah told his companion, “Keep driving,” the charging documents say.

Police said the driver and Bah jumped from the moving vehicle and ran. The car hit two parked vehicles, and the injured man tumbled to the pavement. Police said that Bah took off his clothes and ran to the Calverton Shopping Center, where he climbed on the firetruck and walked back and forth along the ladder.

After several minutes, Bah can be seen on the video climbing down from the back of the truck. He was immediately Tasered, and he fell to the pavement.

Maj. Mark Parson, commander of the police department’s training division, called the arrest a “textbook use of a Taser.” PCP can cause violent outbursts in which people feel no pain and can exhibit increased strength.

Without the Taser, Parson said, “we would’ve had to go hands-on, and that would not have been pretty.” He added: “There may not have been enough officers on the scene to take this guy. . . . We would have had to fight this man. Somebody would have gotten hurt.”