Two miners have been rescued from an elevator after they were trapped halfway down a mine shaft south of Sydney.

The pair were stranded more than 150 metres down the shaft for nine hours after the lift broke down at the Tahmoor Coal Mine near Wollongong on Wednesday evening.

The men were in good spirits as rescue crews communicated with them using radios, a Fire and Rescue NSW spokesman said.

A small cage was lowered down late on Wednesday to inspect the elevator and begin the operation involving four FRNSW crews and specialist rescue squads.

“The employees reached the surface safe and well close to midnight, passing medical checks before being reunited with their families,” mine owners SIMEC Mining said in a statement.

An investigation has begun into the cause of the incident and what improvements can be made to ensure it doesn’t happen again, the company said.

“SIMEC Mining would like to thank the emergency services crews and its own employees who responded promptly to ensure a safe outcome.”