Dylann Roof's friend, Joey Meek who was the only person to be aware of the assailant's plan to shoot individuals at a church in South Carolina, was sentenced on Tuesday, (21 March) to 27 months in jail.

At the sentencing hearing, Meek told the court that "I don't know if I will make it out of prison alive. I'm scared."

He added saying "I'm sorry from the bottom of my heart. I really wish I would have called the cops."

Meek wasn't accused of having a direct role in the shooting. According to federal prosecutors, he lied to the FBI by refusing to admit that Roof had shared his plans with him.

The gunman's friend was arrested in September 2015 and was charged with misprision of felony – which means concealing and failing to report a crime – and lying to the federal investigators, CNN reported.

In April, Meek pleaded guilty to the charges. He said that Roof shared his plan just a week before the attack over vodka, cocaine and video games.

Prosecutors alleged that Meek told an FBI agent that "he did not know specifics of Dylann Roof's plan to shoot individuals on a Wednesday, during Bible Study, at an AME church in Charleston, South Carolina."

However, "Meek's statements and representations denying such specifics were false, fictitious and fraudulent when made," the prosecutors said.

Meek's lawyer Deborah Barbier said after the hearing that her client "has expressed to all of the families of the victims of the brutal murders at the AME church his sincere remorse and sympathies for their losses."

The judge Richard Gergel said the punishment for Meek should deter anyone from repeating the behaviour. The judge wrote that "the danger he exposed to the community is extraordinary".

Meek had been friends with Roof in middle school but had reportedly lost contact. They reconnected few months before the shooting occurred.

Dylann Roof
Police lead suspected shooter Dylann Roof into the courthouse in Shelby, North Carolina, U.S. June 18, 2015 [file photo] REUTERS/Jason Miczek/File Photo