A Greek court has given a five-month suspended sentence to a Turkish civilian who says he strayed accidentally into Greece while working near the border.

The court sentenced the 37-year-old Thursday for illegally entering Greece the previous day. The man was detained while driving an excavator on the Greek side of the border. He appealed and was being held pending being returned to Turkey.

The man, who was also fined 1,500 euros ($1,797), said he had been working on the construction of a well at a Turkish customs post. He said he got confused and turned accidentally into Greece instead of Turkey after work.

Turkish authorities arrested two Greek soldiers in the same area two months ago. Greek officials said they had strayed across the border accidentally while on patrol.