Less than two months ago, Wajh S. Jamison took the witness stand during a murder trial and matter-of-factly told a courtroom full of people he's carried a gun for a long time "for protection ... from the things I be into: My lifestyle."

That lifestyle has now cost him about five years of freedom.

Jamison, 21, of 445 N. Beaver St., pleaded guilty Tuesday in York County Court to a third-degree felony charge of firearms not be carried without a license.

As part of a negotiated plea agreement, he was sentenced to two to six years in state prison. Other charges, including being a convicted felon in illegal possession of a firearm, were dismissed. The plea agreement took into account Jamison's cooperation in a recent murder trial.

He also pleaded guilty to possession of a small amount of cocaine, for which he received a concurrent sentence of probation.

But Jamison must serve a consecutive 2-1/2-year sentence on a probation violation, according to chief deputy prosecutor Dave Sunday, who said that translates to about five years of Jamison being off the streets.

He has already served about 16 months of his sentence.

Jamison has been held in York County Prison since June 21, 2012, according to defense attorney Rick Robinson, who declined comment outside the courtroom.

Murder trial: Jamison -- who police said is affiliated with the city's Parkway gang -- testified in the September murder trial of Antonio "TJ" Wormley, who police said is affiliated

with the city's south-side gang.

York City Police said Wormley, Kyle Westry and other south-siders sought out Jamison and confronted him with guns on June 21, 2012, near the corner of West Princess Street and South Pershing Avenue. They were upset because they believed Jamison shot one of their buddies, trial testimony revealed.

The confrontation turned into a shootout and Westry, 21, was killed.

Although Jamison admitted he fired during the shootout, he wasn't charged because he had a legitimate -- albeit "despicable" -- self-defense claim, Sunday said at the time.

Not happy: Sunday told jurors in the Wormley trial he wasn't "jumping for joy" that he couldn't charge Jamison with murder, but said that's simply the law. He also noted that Jamison "certainly gets shot at all the time."

Two of Jamison's family members testified he appeared to be wearing a bulletproof vest at the time of the shootout.

Even though it was one of their own who died, Westry's associates were charged with various offenses for allegedly causing the shootout. Wormley was the only one charged with homicide.

A jury found Wormley not guilty of third-degree murder, but hung on lesser charges.

Cold reality: Sunday said police and prosecutors are forced to work with the witnesses they have because too often, York City crime witnesses refuse to come forward and testify.

"The cold reality is ... we need people to cooperate with us," he said. "Until people in this community will come forward, sit in a trial and testify, the commonwealth will always be going into these cases handicapped."

Sunday said it saddens him not only that law-abiding citizens in York City "are surrounded by hundreds of Wajh Jamisons out there," but also that a young man such as Jamison feels he must be armed for his own protection.

"No one should have to live in fear of being shot outside their own house," Sunday said. "Even Wajh Jamison."

-- Reach Liz Evans Scolforo at levans@yorkdispatch.com.