Rogelio V. Solis, Associated Press
Clayton Kelly, a political blogger, left, confers with his attorney Kevin Camp in a Madison County courtroom during motions in Canton, Miss., Monday, June 8, 2015.

CANTON, Miss. — A blogger who pleaded guilty in a conspiracy to breaking into a nursing home and shooting unauthorized video of the ailing wife of a U.S. senator was sentenced Monday to serve more than two years in prison.

Clayton Kelly, 29, of Pearl, Mississippi, shot the video of Sen. Thad Cochran's then-wife in 2014 during a tough Republican primary.

On Monday, Mississippi Circuit Judge William Chapman gave Kelly the full five-year maximum sentence but allocated 2.5 years to prison and the rest to probation.

Images of Rose Cochran, who had dementia, appeared online briefly during the primary. Kelly was one of several people who conspired to produce the video suggesting Thad Cochran was having an affair, investigators say.

Cochran's campaign said he wasn't involved in an improper relationship.

Rose Cochran died in December. Thad Cochran last month married a longtime aide.

Cochran eventually won the primary over a tea party-backed state senator, Chris McDaniel. Cochran is chairman of the Senate Appropriations Committee.

Prosecutors said an investigation showed no direct link between the McDaniel campaign and the video of Rose Cochran, although Kelly and the others who participated in the conspiracy had openly supported McDaniel.

Kelly pleaded guilty June 8 as jury selection was beginning. Prosecutors dropped burglary and attempted burglary charges.

He had been free on bond since shortly after his arrest last year. He was taken into custody after his sentencing.

Charges against three other defendants in the case have been resolved.

Richard Sager, a Laurel teacher and coach, who had been charged with conspiracy and tampering with evidence, entered a pretrial diversion program. His case won't be prosecuted if he successfully completes the program.

John Mary of Hattiesburg pleaded guilty in August to conspiracy and agreed to cooperate with investigators. Mary received no jail time and could have the conviction wiped from his record if he completes probation.

Ridgeland Attorney Mark Mayfield, who was charged with conspiracy, killed himself in June 2014.