An early morning quake off the Porirua coast has shaken residents in the centre of the country.

The 4.4-magnitude tremor, located 30km northwest of Wellington at a depth of 37km, struck just after 3.30am on Friday.

It was rated as moderate on the GeoNet website and was widely felt in the lower North Island and the top of the South Island.