Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Mississippi man being held at a county jail on a misdemeanor charge asked a guard to charge his cellphone. The phone was confiscated, and the man was slapped with a 12-year prison sentence for possessing a phone in a correctional facility.

The case has drawn strong reactions on social media, with many people urging Gov. Tate Reeves to get involved.

Willie Nash, 39, was booked into the Newton County Jail in 2018. According to court documents, the married father of three handed a guard his phone and asked if it could be charged. The guard took the phone and gave it to a sheriff’s deputy.

When asked about the mobile device, Nash initially denied it belonged to him but eventually gave the deputy the password to unlock it. A court document states that Nash was using the phone to text his wife that he was in jail.

Mississipppi law prohibits inmates in correctional facilities from possessing a cellphone. It is a felony offense with a sentence of 3 to 15 years, according to the court document.

Willie Nash. Mississippi Department of Corrections via AP

A jury found Nash guilty of breaking the cellphone law and in August 2018 a judge sentenced him to 12 years in state prison. The judge told Nash to consider himself lucky because given his past burglary convictions he could have received the maximum 15-year sentence, according to a court document.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Nash did not appeal the verdict but challenged his sentence, saying it was "grossly disproportionate to the crime" and violated the U.S. Constitution's Eighth Amendment, which forbids cruel and unusual punishments.

On Jan. 9, the Mississippi Supreme Court affirmed Nash’s conviction and sentence. According to online jail records, his expected release date is February 2029.

Justice James D. Maxwell II, writing for the court, said in the court document that while Nash’s sentence of 12 years was harsh it fell within the statutory range for that offense.

Justice Leslie D. King, however, wrote in an opinion that while he agreed the court reached the correct result under the law, he had concerns that the case demonstrated "a failure of our criminal justice system on multiple levels."

King pointed out that an officer testified in Nash’s case that all inmates being booked into jail are strip-searched, "yet Nash went into the jail with a large smartphone that would have likely been impossible to hide during a strip search."

"It seems problematic to potentially allow someone into the jail with a cell phone, and then to prosecute that person for such action," King wrote in his opinion.

King said because the crime was victimless, the prosecutor and court could have taken a rehabilitative approach, instead of handing down a sentence.

"His crime was victimless, and the facts of the case lend themselves to an interpretation that his crime was accidental and likely caused by a failure in booking procedures," he wrote. "Nash did not do anything nefarious with his phone, and he certainly did not hide his phone from law enforcement."

The sentence has drawn criticism from many people on Twitter.

“Willie Nash’s sentence may be legal and all, but the application is disproportionate beyond all reason,” one Twitter user wrote.

Another said the “justice system is completely broken.” Several people on Twitter asked Gov. Reeves to step in. “@tatereeves pls consider commuting the sentence of #WillieNash. As a conservative I believe in personal responsibility and accountability but abject failure for following search protocols by PD and CO should not cost this man 12 years,” one user posted.

Reeves' office did not immediately return NBC News' request for comment.