VANCOUVER -- A woman who got stuck at the top of her sailboat's mast had to be rescued in Surrey Monday evening.

Fire crews were called to the marina at Nico Wynd Estates at about 5 p.m., when a woman became trapped dozens of feet above the deck of her boat. 

The Surrey fire department told CTV News the woman was working on her sailboat when the pulley chair system used to move up and down the mast malfunctioned and she got stuck. 

Crews say she was trapped for several hours before they were able to get her down. 

While the woman was cold, she was safe and walked away from the scene after being checked out by paramedics.