A model for the earthquake cycle in underthrust zones