OAKLAND -- A 30-year-old Pittsburg man was sentenced Thursday to 15 years to life in prison for fatally shooting an Oakland man in 2012 to avenge a carjacking.

Westley Young pleaded no contest in April to second-degree murder for shooting 19-year-old Aaron Marks several times on Nov. 24, 2012 outside a barber shop on San Pablo Avenue and 60th Street.

Young took a plea deal, but had he gone to trial the prosecution intended to prove Young's motive was that Marks carjacked him at gunpoint in the same neighborhood 10 days before the fatal shooting, according to Young's probation report.

Judge Jon Rolefson on Thursday commended Young for a seven-page letter he wrote in which he took responsibility for Marks' murder and the damage the killing caused to Marks' family as well as his own.

Attorneys in the case were not immediately available to comment.

Contact Malaika Fraley at 925-234-1684. Follow her at Twitter.com/malaikafraley.