Hi Learneng,
Remember that we don't want to change the tense here, so use
when rather than
until to keep the sentence focused on an event in the past.
~~~
I was cursing the person who cut me
up / off in the morning.
He was creating a havoc
when security escorted him out of the building.
It was raining cats and dogs last night.

They were parking at the wrong spot
when the inspector gave them a ticket.
We were
barbecuing food when
the fire alarm went off. (I prefer this sentence)
The fire alarm went off
whilst / when we were
barbecuing food. (this is also grammatically acceptable)