The 6.5-magnitude tremor was centred 35 miles (57 km) off the coast south of the capital at a depth of 6.3 miles, said the US Geological Survey.
But while some structural damage and power cuts were reported, officials said there was no risk of a tsunami.
The quake hit at 17:09 (05:09 GMT) and was felt as far north as Auckland.
It smashed windows, knocked stock off shop shelves and burst some water pipes, but there have been no reports of serious casualties.
Wellington resident James Barwell said the earthquake had caused power cuts in the city suburbs and prompted the temporary closure of its airport.
“There’s been a bit of structural damage, lots of shattered glass everywhere,” he told the BBC. “Initially there were a few screams and panic, people thought it was another Christchurch.”
A 6.3-magnitude earthquake centred near Christchurch in February 2011 killed 185 people.
Sunday’s tremor was the latest in a series that have shaken the lower half of New Zealand’s North Island in recent days.
New Zealand lies on the notorious Ring of Fire, the line of frequent quakes and volcanic eruptions that circles virtually the entire Pacific rim.