Get out of a jam

To get free from a problem or bad situation.

I got out of a jam this morning when my coworker came to help me finish the job.