CHARLESTON, S.C. (Reuters) - The South Carolina man who suspected his friend Dylann Roof was to blame for the June 2015 massacre at a historic black church but did not immediately call police and told others to stay silent was sentenced on Tuesday to more than two years in prison.

FILE PHOTO: Police lead suspected shooter Dylann Roof into the courthouse in Shelby, North Carolina, U.S. June 18, 2015. REUTERS/Jason Miczek/File Photo

Joey Meek, 22, told authorities Roof revealed his plot during a cocaine and vodka-fueled night about a week before the shooting, which was one of several racially charged shootings in recent years that reopened debate about race relations and gun control laws in the United States.

Roof, who is white, told Meek he wanted to start a race war by killing black people at a church, court records show.

But after Roof opened fire during a Bible study meeting at Emanuel African Methodist Episcopal Church in Charleston, slaying nine parishioners, Meek, who is also white, did not promptly report what he knew, prosecutors said.

With Roof on the run, Meek also instructed others not to contact police and later denied to federal agents that he had knowledge of Roof’s plans.

“He knew who it was,” U.S. District Judge Richard Gergel in Charleston said before sentencing Meek to 27 months in prison. “He put his own interests ahead of the known dangers to the community.”

Prosecutors had sought a stiffer penalty than the 27 to 33 months federal sentencing guidelines called for. Meek was the only other person charged in the shooting. He pleaded guilty in April 2016 to charges of concealing knowledge of the crime and lying to investigators. He agreed to cooperate.

Meek was not called to testify at his childhood friend’s trial. Roof was sentenced to death in January after being convicted of 33 charges, including hate crimes and obstruction of religion resulting in death.

The government argued law enforcement could have tried to prevent Roof’s attack had Meek alerted them.

Meek’s lawyer Deborah Barbier said in court papers that her client, who had a ninth-grade education and history of mental health and substance abuse problems, should not be treated as though he was guilty of Roof’s crimes.

Gergel, who oversaw Roof’s trial, said Meek’s criminal behavior did not begin until after the shooting.

With about a dozen members of the victims’ families in court, Meek read a statement expressing his remorse for not taking Roof more seriously.

“I didn’t believe he could do something so awful and cruel,” he said.