Andrew McClinton has been sentenced to 10 years in jail for burning down an historically black church in Mississippi

A member of an African American church in Mississippi has been sentenced to 10 years in jail for setting light to the building in the run-up to the 2016 election.

Andrew McClinton, 47, was sentenced on Thursday after admitting to police that he set the fire back in March, which prosecutors say was designed to hide illicit activities he had committed inside.

But he continues to deny spray-painting 'Vote Trump' on the side of the building in an apparent effort to make the fire look like a hate crime.

Mississippi has a history of churches being burned to intimidate black voters.

McClinton gave investigators varying accounts when he admitted setting the fire at Hopewell Missionary Baptist Church in Greenville, Washington County District Attorney Dewayne Richardson said on Thursday.

Richardson said McClinton was involved in 'illicit' activities at the church and set the fire to prevent fellow congregants from meeting the next day to discuss it.

'He was trying to hide that information from being disclosed,' Richardson said, without elaborating on what the activities were.

This isn't the first time McClinton has been in trouble with the law. In 1997 he was sentenced to seven years for attempted armed robbery in Lee County.

And in 2004 he was convicted of armed robbery again, serving eight years in prison.

Hopewell Missionary Baptist Church was burned down in the lead-up to the 2016 election and had 'vote Trump' spray painted on the side, leading many to think it was a hate crime

Prosecutors say McClinton admitted to burning down the building to conceal 'illicit activities' - without saying what they were - but denies being behind the graffiti

He also received three years' probation for grand larceny in 1991; that probation was revoked the following year because he received stolen property.

McClinton's supervision by the department ended in February, the spokeswoman said.

Because of his previous convictions, McClinton will not be eligible for early release, Richardson said.

Circuit Judge Margaret Carey-McCray also gave McClinton a 10-year suspended sentence, with some of that suspended sentence under state supervision.

Richardson said police believe McClinton acted alone, and the investigation is closed.

Greenville is a Mississippi River port city of about 32,100 people, and about 78 percent of its residents are African-American.

While it's not unusual for people of different racial backgrounds to work and eat lunch together, local residents say the congregations at most churches remain clearly identifiable by race.

McClinton admitted to the fire back in March, prosecutors say, after giving conflicting accounts of why he set the blaze

On Wednesday Greenville Mayor Errick D Simmons called the church-burning 'a direct assault on the Hopewell congregation's right to freely worship'.

'There is no place for this heinous and divisive behavior in our city,' he said. 'We will not rest until the culprit is prosecuted to the fullest extent of the law. We take pride in our work to have a unified city and we look forward in continuing that work.'

Hopewell was founded in 1905 in the heart of an African-American neighborhood, and the congregation now has about 200 members.

While some walls of the beige brick church survived the fire, the empty windows are boarded up and church leaders have said the structure will likely be razed. Rebuilding could take months.

Greenville is in Washington County, a traditional Democratic stronghold in a solidly Republican state.

In the presidential election, Republican Donald Trump easily carried Mississippi, but Democrat Hillary Clinton received more than twice his votes in Washington County - 11,380 for Clinton to 5,244 for Trump.

McClinton is scheduled to make an initial court appearance Thursday in Greenville, charged with first-degree arson of a place of worship.

He faces between five and 30 years in prison if found guilty. He would also have to pay for all the damage caused.