An earthquake measuring 4.1 has rocked the Hawke's Bay overnight.

The moderate strength tremor struck 20km east of Porangahau at 2.36am.

Geonet said it was at a depth of 22km and felt throughout the region.