I'm looking for a Ukrainian idiom which would mean the same as the English "on one's last legs." Here is the context:
By then, the Soviet Union was on its last legs; it would be dissolved the following year."
Is there an idiom which could be used like this? If there isn't, a phrase which would sound natural would be greatly appreciated. Thank you for your help!