Yes it happened with Ukraine too. I hypothesize that a lot of such deals were made with the aim of stopping nuclear proliferation. The theory could extend to the idea that Russia has a deal with Iran to not build nukes, in exchange for Russia defending Iran (The US couldn't do that with Iran since Israel and Iran are at odds and the US couldn't promise defense to both sides.... well they could in secret like the UK always did I guess).