A late-night quake has rattled thousands across the middle of the country.

The 4.6 magnitude earthquake struck at 11.09pm and was centred 30km northwest of Porirua, GeoNet said.

It was 38km deep and almost 9000 felt reports have been logged from people in the bottom half of the North Island,