with one’s back to the wall
Example: The soldiers came and soon he was surrounded with his back to the wall.