The nukes were under the control of Ukraine, who relinquished them under that Budapest Agreement. They were basically abandoned by the soviets.
Interesting. Problem was that if Ukraine kept their nuclear weapons, that would had provoked Russia. But at the same time, Russia would ultimately leave them alone.