Maggie and her friend were having a sleepover.
They didn't even get to do the other things they had planned.
They ended up having to stay for an emergency.
They ended up having to leave for an emergency.