A thief has been left red-faced after stealing a jacket from Melbourne firefighters, only to get stuck between two walls and require rescuing moments later.

The man made off with the blue Metropolitan Fire Brigade (MFB) jacket from a fire station precinct in Church Street in Richmond just after 11pm yesterday.

A short time later police and emergency services were called to Lincoln Street, following reports a man could be heard moaning and groaning.

Firefighters rescued the thief who was stuck between two walls. (Nine)

The man stole a jacket from the MFB precinct. (Nine)

Officers found the thief stuck between two warehouses after allegedly falling from the roof.

The MFB helped free the 39-year-old from the crevice, who then attempted to flee from police, only to turn a corner and run straight into their waiting arms.

The man is currently under police guard in hospital.

He was not believed to be seriously injured.