CARSON CITY, Nev. (AP) — Nevada’s Appellate Court has issued an order saying a district judge had no authority to permanently ban an offender from Winnemucca.

Officials say the offender, John Pugh, was sentenced to prison after pleading no contest to illegally using a stun gun.

District Judge Michael Montero added an additional condition following Pugh’s release from prison, telling him he was permanently trespassed from Winnemucca, about 470 miles from Las Vegas.

The Nevada Appeal reported Monday that the court order removes that condition from Pugh’s sentence because it is an abuse of discretion.

Officials say the district court can prohibit the offender from being in a certain region, but does not have the ability to permanently ban them from part or all of the state once the sentence is complete.