A man in northern Mexico had to be rescued after he accidentally trapped himself in a hole he dug so he could spy on his former girlfriend in violation of a court order to stay away from her, authorities said on Sunday. The Sonora state attorney general’s office said the 50-year-old man spent days digging the hole in Puerto Penasco, a town on the Gulf of California, only to become trapped and require help to get out. The man had been ordered to stay away from his former girlfriend due to domestic violence charges and he is now in jail, authorities said. The newspaper El Universal said the man dug a tunnel under the woman’s house. It said the woman told police that over the course of a week, she had heard scratching noises but assumed the noise was cats. But when the sound grew louder, she investigated and found her former partner of 14 years trapped below, the report said. She said she ended the relationship because her partner was very jealous. Police said the man appeared intoxicated and severely dehydrated when they got him out of the tunnel.