idiom
against the ropes
Meaning
in a difficult situation or near defeat
Example
The company was **against the ropes**, but it managed to recover.