A man remains under police guard in hospital after spraying petrol at a Sydney service station before setting it alight.

The shocking incident unfolded about 2.20am this morning on Regent Street, Chippendale.

CCTV footage shows the man grab a fuel pump and pour petrol all over the ground before lighting it.

A man is under police guard at hospital after spraying petrol at a Sydney service station and setting it alight. (Nine)

A service station attendee races out to get a fire extinguisher, but the man crawls over to a second bowser, picks up two hoses and starts spraying petrol again.

He then lights the second bowser which nearly explodes in his face.

The man was injured in the fire he caused. (Nine)

A NSW Police spokeswoman said firefighters raced to the scene but the flames had already been extinguished.

She said the man was arrested and taken to Royal Prince Alfred Hospital in Camperdown for a mental health assessment and treatment of minor injuries.