A woman had a narrow escape when she was trapped inside a burning building in Whangāmata on Sunday night.

Police were called to the fire in a two-storey building on Hauturu Street shortly after 9pm.

Fire and Emergency also responded, with five crews on the scene, and extinguished the fire within the hour.

Police said the 72-year-old woman was trapped inside the house.

Members of the public heard her calls for help, and were able to help her escape through a bathroom window.

Police said a 66-year-old man was arrested at the scene.

He appeared in Hamilton District Court on Monday, charged with arson.

He is due to reappear in court again on Tuesday.