A 61-year-old Austrian man was arrested last month for having sex in a shrine in Japan with a Japanese woman in her 40s, local police told CNN on Wednesday.

The couple were caught having sex on August 22 while in the grounds of a shrine in Kesennuma –- a small coastal town about 500 kilometers (310 miles) north of Tokyo –- and faced charges of disrespecting a place of worship.

Police told CNN that they arrested the man, fearing he could be a flight risk, but did not arrest the woman after concluding there was no risk of her fleeing.

The man has since been released from custody, but the police said they could not disclose details of his punishment and did not clarify whether he was a tourist or a resident. These cases don’t always end in forced repatriation, the police added, and can result in a fine.

Although such a case is rare, there have been other instances of people being arrested for disrespecting Japanese shrines.