An officer has been stabbed in the leg with a knife outside a Perth police station.

The sergeant was trying to subdue a 46-year-old man, who was threatening self-harm, at 3am on Friday outside the Gosnells station.

The officer was taken to Armadale Hospital, where he received several stitches, while the other man was taken to hospital for a health assessment and is now in police custody.

Readers seeking support and information about suicide prevention can contact Lifeline on 13 11 14.

MensLine Australia 1300 78 99 78.

AAP

Latest From 7News