Earthquakes can only occur within the lithosphere because rocks in the lithosphere are strong enough to store stress.