SALEM – A Lynn man who was allowed to plead guilty to a reduced drug charge involving a hand-to-hand sale with an undercover officer last year will spend two years in state prison and will lose his license for five years.Fernando Murga, 23, of 12 Bennett Circle, Lynn, pleaded guilty to a charge of possession with the intent to distribute cocaine.Superior Court Judge Howard J. Whitehead sentenced him to the recommended sentence offered by the prosecutor and defense.Assistant District Attorney A.J. Camelio said the charge stems from the sale of one bag of crack cocaine to an undercover police officer for $40 on Aug. 31.In asking the judge to adopt the sentence agreement, defense lawyer John P. Morris told Whitehead that his client accepted responsibility and has from the onset of the case.Even though Murga had been previously convicted of drug distribution, the state agreed not to prosecute that case in return for a plea, sparing Murga a mandatory five years in prison.The judge credited Murga the 21 days he spent in jail while held on bail awaiting trial on the case.Murga has been serving a 6-month jail sentence for violating his probation in another drug case, but the state prison sentence effectively erases that jail term, Whitehead ordered.