An 18-year-old Baker man admitted his involvement Wednesday in a January 2012 shooting outside the Mall of Louisiana that injured two teenage bystanders.

Michael L. Burrell pleaded guilty to two counts of accessory after the fact to attempted first-degree murder and was sentenced to two years in prison followed by five years of probation. He was charged with two counts of attempted first-degree murder.

Burrell’s 18-year-old co-defendant, Johnny Williams, of Baton Rouge, pleaded guilty last month to two counts of attempted first-degree murder and was sentenced to 20 years in prison.

Prosecutor Adam Haney told state District Judge Trudy White on Wednesday that Burrell supplied the gun that Williams used to shoot into a crowd outside the mall at 9:30 p.m. on Jan. 7, 2012, striking two high school students. Burrell also drove Williams away from the scene in Burrell’s car, Haney said.

Under the terms of a plea agreement, White actually sentenced Burrell to 10 years in prison but she suspended all but two of those years and put him on active supervised probation for five years once he is released from jail.

The judge warned Burrell that he could face another eight years in prison if he violates his probation, which includes a 10 p.m. to 6 a.m. curfew, electronic monitoring, random drug testing, having a “support system” by attending 100 Alcoholics Anonymous meetings, and a requirement that he complete his high school education.

“It’s all up to you,” White told Burrell. “It takes no work to do wrong. It takes a lot of work to do right.”

Burrell’s attorney, Anna Simmons, said after court that Burrell is very sorry for what occurred outside the mall.

“We hope to get him on the right track,” she said.

Burrell and Williams were 17 at the time of the shooting.

Immediately prior to the shooting, Burrell and Williams had argued with a group of young people near the mall, an affidavit of probable cause says.