Well, the USSR. Pakistan's also seen a lot of coups over the years.
I may take your word, for it, but the USSR fell without Russia really changing hands. The mess in Ukraine, I would attribute to Russia’s failure to clean-up after the collapse of the Soviet Union. Russia simply left the status quo in place in Ukraine with nuclear missiles pointed at the West.
I don’t know about Pakistan. I expect that not much worse could gain charge of the weapons, though.