Argh, the preposition per was such a strong hint towards that meaning and I missed it! Thank you formica once again!
But your answer raises other questions: can we say "mi sono fermato (di) fumare" or "ha fermato (di) fumare" and, if yes, does it mean "I stopped smoking" with the context being "when my mother suddenly entered the room"?
P.S. I know that for the stronger " to quit smoking" formica proposed "smettere di fumare".
I'll try. Reflexive verbs require 'essere'. This verb is being used reflexively here since the person speaking is not stopping something else, such as a car, but is in a sense stopping himself or herself, though the "self" isn't expressed but is implicit. So use 'avere' if 'fermare' is used with a direct object: Ho fermato la macchina. But Mi sono fermato/fermata alla incrocia. Literally: I stopped (myself) at the intersection, though you wouldn't include 'myself' in English.