Two climate activists in England were sentenced to several years in prison on Friday for temporarily blocking an important Thames bridge. The British news agency PA reported on Friday that a 40-year-old man has been sentenced to three years in prison. A 34-year-old man, who the BBC says is German, was sentenced to two years and seven months. They had previously been found guilty of disturbing public order.

The two activists from the Just Stop Oil group climbed onto the pillars of the Thames Bridge in Dartford, east of London, in early October last year. The suspension bridge is part of the ring road around the British capital and is one of the busiest traffic routes in the country. The two men climbed to a height of around 60 meters using professional climbing equipment, the BBC reported. The bridge had to be closed to traffic for 40 hours.

Judge Shane Colery at Southend Crown Court justified the harsh sentence with a deterrent effect. “You need to be punished for the mess you’ve made to stop others from imitating you,” he said at the sentencing hearing, according to the PA.