Firefighting equipment was brought in after a prisoner climbed onto the roof of HMP Garth Prison in Leyland.
The man was seen walking up and down the roof of the category B prison around 6pm on Thursday.
Crews from Preston were called at 10pm and asked to provide an aerial ladder platfrom - a crane-line arm often used for tackling fires from above.
This allowed a specialist negotiator to access the roof.
The crews were relieved by another crew at around 4am. The man was still on the roof at that time.
The Ministry of Justice has not commented.