The quake struck on Monday near Mazar-i-Sharif, a city known for its magnificent Blue Mosque. The extent of the damage was not immediately clear.