Caterpillar that came in the Broccoli

Caterpillar that came in the Broccoli

Observation - Caterpillar that came in the Broccoli. Description: Found this 7cm long caterpillar in a sealed head of Spanish broccoli. After feeding on broccoli for a week it burrowed into the soil, presumably to pupate. Currently it is in a jar full of soil. Is it a pest? should it be let loose in the UK? Any ideas I

Found this 7cm long caterpillar in a sealed head of Spanish broccoli. After feeding on broccoli for a week it burrowed into the soil, presumably to pupate. Currently it is in a jar full of soil. Is it a pest? should it be let loose in the UK? Any ideas I have searched and searched other caterpillar pictures to no avail.