A former Prince George's County police officer who said he was distraught over gambling debts was spared a prison term after admitting in court that he used a fake bomb in a bank robbery attempt.

James E. Nowlin, 37, of Laurel, a 13-year member of the force who resigned after the December incident, pleaded guilty in Prince George's County Circuit Court to assault with intent to commit robbery, a felony punishable by up to 10 years.

Judge Darlene G. Perry sentenced him Tuesday to three years in prison, but suspended the term and ordered Nowlin to perform 20 hours of community service and to continue psychiatric treatment for compulsive gambling.

"She handled it very appropriately," defense attorney Joseph DePaul said of the judge.

"It was an unusual case, and she handled it with style," he said.

Neither DePaul nor Nowlin offered details of the gambling addiction in court, and DePaul declined to discuss it in an interview yesterday.

But he said Nowlin was depressed about his debts at the time of the robbery attempt.

"He did something that seemed to be a cry for help," DePaul said, noting that Nowlin told a friend and fellow officer about the incident a few days after it occurred Dec. 4. "Had this man not, in fact, come forward on his own, he might never have been apprehended," DePaul said.

Police said Nowlin, a corporal assigned to the department's Special Operations Division, placed a fake bomb in a tube at a drive-up window of the Maryland National Bank branch at 6820 Riverdale Rd. in Riverdale.

Included with the fake bomb was a note in which he threatened to detonate the device unless the teller turned over $50,000, police said. They said Nowlin drove away empty-handed after the teller fled from the window.

Shortly afterward, Nowlin admitted himself to Taylor Manor Hospital, a psychiatric institution in Ellicott City, where he was arrested Dec. 7.

DePaul said Nowlin's sentence was suspended largely because of his psychological problem and because he did not use live explosives in the robbery attempt. "There was never any real danger to anyone," he said.

Defense attorney DePaul said he intended to eventually ask Judge Perry to reduce Nowlin's punishment to "probation before judgment."

If Judge Perry agrees to the defense request, DePaul said, Nowlin's criminal record would be expunged after a successful period of probation.