A man wearing camouflage clothing and carrying a briefcase packed with five pipe bombs held 12 people hostage for 2 1/2 hours yesterday at a Maryland state government office at Landover Mall, then surrendered to police peacefully almost three hours later. No one was injured.

Prince George's County police rescued the hostages, all women, at about 4:30 p.m. by cutting through the plasterboard wall of an adjacent clothing store and leading them to safety while a police negotiator diverted the man's attention. The man surrendered without incident at 7:19 p.m. and was led, handcuffed, to a waiting police car.

Late last night, the county fire department bomb disposal squad dismantled the explosives, which a department official described as "five active pipe bombs." Fire Capt. Jim Mundy said he could not discuss the construction of the bombs because they were being held as evidence. He described them, however, as being powerful enough to have caused "major fragmentation damage" and "minor structural damage throughout the office suite" had they exploded.

The suspect, identified as 21-year-old Leonard Thomas Dunmore of 7806 Glenarden Parkway, Glenarden, has been charged with one count of kidnaping in the incident, police said. He was being held in lieu of $150,000 bond last night pending arraignment, police said.

Police also confirmed last night that Dunmore had been sent recently to St. Elizabeths Hospital for treatment after he allegedly threatened President Reagan. U.S. Secret Service officials declined to comment last night on the alleged threat.

Prince George's County Police Cpl. William Hogewood, who negotiated with the man throughout the afternoon and early evening at first by telephone and then face to face, said that the man demanded he be supplied with iced tea and cigarettes and that radio station WHFS play all of David Bowie's and Brian Eno's records, except for Bowie's "Electric Blue."

Hogewood told a reporter that early in the negotiations the man conceded that his original demands were "kind of silly." Later, Hogewood said, the man asked for immunity from prosecution and "exile" from the United States.

"He was up, down and sideways" in behavior, Hogewood said, noting that the man's actions were erratic and that he seemed primarily to want attention.

Dr. Harvey Goldstein, director of psychological services for county police and a member of the negotiating team, described he man as being angry, resentful and depressed about not being able to effect any change in his life. "We considered him rather disturbed and violent," Goldstein said.

Police were notified of the takeover of the state Vocational Rehabilitation Center when a woman employe phoned them shortly before 2 p.m. and said that she and other employes there were being held hostage by a man who told them he had a bomb.

Another hostage said later that the man told an office receptionist he had a bomb in his briefcase and that it would explode if he put his hand on it. He then allowed the woman to call police.

The office is located on the second story of a three-story building at 2487 Brightseat Rd. that is attached to the Landover Mall and adjacent to a Sears Roebuck store. Police and fire officials arrived at the scene minutes later and quickly evacuated hundreds of shoppers and workers from the office building, a portion of the Sears store and two banks.

Police were uncertain at first that the man actually was carrying explosives, and as soon as he was identified, officers were dispatched to search his home. Police officials said later that they learned the man did "have access to explosive materials and that he has made and successfully exploded those devices."

Telephone negotiations with the man began at about 3:45 p.m. About the same time, a special emergency team began sawing through the plasterboard wall that separated the office from a women's clothing store. The team used razor knives to minimize the sound of sawing.

About 4:15 p.m. Hogewood persuaded the man to allow him to enter the office to give him cigarettes and coffee, which he had requested. While Hogewood talked with the man, several of the hostages were led through the hole in the wall and others were then taken through a nearby door to safety.

Sometimes by telephone and at times standing in a front reception area of the office, Hogewood continued negotiating with the man, who he said did not seem upset that his hostages had been freed.

Shortly after 7 p.m., negotiators persuaded the man to place the briefcase containing the bombs on a table and walk away from it. Police then entered the office and led him out of the building. One woman hostage, Alice Wade, director of the office, said last night that most of the hostages were in an inner office while the man stayed in the reception area where he talked to police. "We were all very calm and collected," she said. "We were able to get all of my staff in the back offices, and close the door and barricade it. There was a lot of gallows humor."