A tsunami alert has been issued for nine countries following the magnitude 8 earthquake.