An earthquake has caused light shaking near Martinborough, about 15km southwest of Masterton. The magnitude 4.0 quake occurred at 10:32pm on Saturday night.