The 2012 Pernik earthquake was a 5.6 magnitude earthquake, which struck 24 km (15 miles) west of Bulgaria's capital Sofia and 9 km (6 miles) north-northwest of the provincial center Pernik on 22 May 2012 at 3:00 am local time (00:00 UTC) at a depth of 9 kilometers .