A man was hospitalised after an attack by a group of teenagers outside the Palmerston North Corrections office on Monday afternoon.

A man has been discharged from hospital after he had treatment following an attack by a group of teenagers.

The man was set upon by four or five young men with bats and machetes outside the Department of Corrections in Palmerston North just before 2.40pm on Monday, police said.

Corrections Manawatu district manager Hati Kaiwai said the attack happened across the road from Community Corrections office in Cross St but no Corrections staff were involved.

A police spokesperson said the victim received stab wounds to the arm and head, and was transported to Palmerston North Hospital.

A hospital spokesman said the man had been treated for his wounds and was discharged later that afternoon.