They say love knows no boundaries.

An 18-year-old German man’s last-ditch effort to sway his ex-girlfriend into getting back together got him into a tricky spot when he was caught scaling a 13-foot wall at the local women's prison to try and reach her window.

The ex, also 18, had broken up with the man from the northwestern town of Vechta via the prison phone and he wanted to talk to her, according to local media.

STUDENT BURIED BY AVALANCHE DEVELOPED SEIZURES TRIGGED BY SUDOKU

So he scaled up the wall, taking off most of his clothes as a precaution so that he would not get snagged on the barbed wire at the top, regional broadcaster NDR reported.

The half-naked teen then proceeded to climb up to his ex’s window on the first floor.

Prison guards noticed the 18-year-old and, when he refused to climb back down, they called the fire department to bring him down with a ladder.

The teenager is being investigated for trespassing and unauthorized contact with prisoners.

CLICK HERE TO GET THE FOX NEWS APP

It wasn’t clear why he did not get a visitor’s pass or whether the escapade succeeded in winning back the heart of his ex-girlfriend.