An Adelaide man was left “stranded” between South Australia and New South Wales after he was refused entry to both states, a court has heard.

Amin Derakhshan, 31, was charged with failing to comply with a COVID direction after he entered South Australia without the required approvals earlier this month.

He spent a two-week quarantine period behind bars before he pleaded guilty to the offence in the Adelaide Magistrates Court on Tuesday.

Magistrate Clive Kitchin recorded a conviction against him and handed him a two-month suspended sentence on a 12-month good behaviour bond.

The court heard Derakhshan lives and runs a wholesale food and produce business out of a warehouse at Wingfield, north of the CBD.

Defence counsel Hugh Woods said Derakhshan had left South Australia to collect goods from NSW, but he was refused entry by the state’s border patrol.

“He was required to turn around and was left with no other option but returning to South Australia,” he said.

“As he returned to South Australia, he was met with South Australian border patrol.

“This time he did not have an appropriate essential travel number with him and was rejected entry into South Australia.”

Mr Woods said Derakhshan completed an essential traveller form with the help of a police officer at the Pinnaroo checkpoint, but there were difficulties with translation.

“Ultimately, he handed in his essential traveller form … and that was rejected,” he said.

“Regrettably, my client found himself in a position where he was effectively stranded between states.”

Derakhshan, who was assisted in court by a Persian translator, was running low on fuel so drove to a nearby petrol station, which was on the South Australian side of the border.

He had no money for fuel but bought candles and remained inside his van for a number of hours.

“He attempted to comply with the orders not to enter South Australia, notwithstanding the fact he had actually entered at this stage,” Mr Woods said.

The court heard he attempted to sleep in the van but it became “almost freezing”, and he made an “irrational decision” to call his friend to take him home.

A police prosecutor told the court it was unclear how Derakhshan bypassed the border checkpoint, and it was possible he took a back road.

But his lawyer said he had used Google Maps to search for the closest service station and followed the route.

Outside court, a man who works for Derakhshan said his boss was sorry for breaching the direction.

“I feel sorry for that and I apologise to the people of Adelaide,” the man, who did not want to be named, said.

“We all have to care more about our people.”