Image copyright Twitter / @hannarosebutler Image caption The cyclone uprooted trees in some parts of the North Island

New Zealand has begun cleaning up after avoiding the worst of a powerful storm that swept across the country.

Cyclone Cook caused power shortages, landslides, uprooted trees and forced road closures.

Ahead of the storm's arrival, some residents fled their homes as authorities declared a state of emergency in parts of the North Island.

Although the cyclone bypassed much of the country, thousands of homes are still without power.

There is still heavy rain and some roads on New Zealand's South Island remain underwater, with flooding in roads around Christchurch. Several rivers have burst their banks.

Image copyright TVNZ / Reuters Image caption Roads were also flooded in Kaeo, north of Auckland

New Zealand's Civil Defence ministry is warning people to remain cautious, especially around fallen power lines.

The weakening weather system is continuing to bring heavy rain to parts of the South Island, and is expected to pass over Dunedin later on Friday.

The cyclone formed around Vanuatu on Sunday before moving towards the Pacific islands of New Caledonia, bringing heavy rain and winds and causing cuts to power and water supplies.

It killed one person when it swept through New Caledonia.

Image copyright Steve West Image caption There were landslips in Auckland, which was spared from the brunt of the cyclone

The storm made New Zealand landfall in the Bay of Plenty at about 18:30 local time (06:30 GMT) on Thursday. It moved on to batter Hawkes Bay on the eastern coast, where two people were hospitalised after a tree hit their car, the New Zealand Herald reported.

Forecasts said the storm would be the worst since 1968, but meteorologists told local media that the storm system instead tracked away and because it was moving quickly the rain didn't last so long.

Image copyright EPA / Nasa Image caption The cyclone swept through the South Pacific before approaching New Zealand (in outline)

Air New Zealand cancelled several flights as the weather worsened in key areas.

Cyclone Cook comes after severe floods caused by the remnants of Cyclone Debbie hit some parts of the country last week. Cyclone Debbie hit Australia at the end of March, before its remnants moved towards New Zealand.

Sign-up to get news from the BBC in your inbox, each weekday morning