A thirty-nine-year-old man was booked on misdemeanour charges in to the Newton County prison in Mississippi.
Willie Nash was found to have brought the phone in when he asked an employee for “some juice”.
The jailer took the request to mean Nash wanted a drink, until he handed over his handset to be charged.
The jailer gave the device to a deputy sheriff, who later unlocked it using a pass code provided by Nash and found he had sent text messages to his wife.
Justice Leslie King, the only African-American on the nine-member Mississippi supreme court, said Nash could have avoided punishment entirely because it was not clear whether he had even been searched – or told not to bring his phone into the jail.
Nash did not seek to overturn his conviction, but argued on appeal that the sentence handed down in August 2018 was grossly disproportionate and violated a constitutional ban on cruel and unusual punishment.
Mississippi justices unanimously rejected his argument last week, despite state law dictating that sentences for being found with a phone or weapon in jail can be as low as three years.
Mississippi has one of the highest incarceration rates in the US and Justice James Maxwell wrote: “Though harsh, Nash’s sentence falls within the statutory range.”
While the decision was unanimous, Justice King admitted that the sentence demonstrated a “failure of our criminal justice system on multiple levels”.
Nash had previous burglary convictions but was told those had no impact on the sentence he received.
Following the verdict, Justice King wrote: “Nash served his time for his previous convictions and stayed out of trouble with the law for many years. He has a wife and three children who rely on him.
“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.
“Nash did not do anything nefarious with his phone, and he certainly did not hide his phone from law enforcement.”
Nash was told by the trial judge that he could be released after serving 25% of his sentence, but the decision has sparked outrage among sentencing reform activists.
Leonard Pitts, an African-American columnist for the Miami Herald newspaper, published the phone number of Mississippi governor Tate Reeves and urged readers to tell him to “let my people go”.
Mr Pitts told the Associated Press: “Anybody who thinks there’s not a connection between sentences like this and the recent violence in our prisons hasn’t been paying attention.”
Many are in favour of tough sentences for phones being brought into prisons in the US, with jail officers having encountered problems with some inmates taking photos and videos.
During recent violence at the Mississippi State Penitentiary that left five inmates dead and several others injured, prisoners used cellphones to capture images of smoke filling a corridor and cells and inmates sleeping on the floor.