Dieter Meier and Reiner Klose, both 18, had abandoned a stolen car and run into thick forests after being chased by cops in the Mecklenburg-Western Pomerania region.
They managed to lose the officers and planned to wait until the next morning but were charged at by a herd of wild boar.
They climbed up a tree but the animals would not go away and eventually they had to call police. They were immediately arrested and charged with theft.
A police spokesman said: "They were petrified by the boar. They decided arrest was better than the pigs."