Spain had its own atomic bomb program.

They had fascism from the 1930s to the 1970s and needed the atomic bomb to protect their colonies in Morocco.

But after the end of fascism the project was shut down in 1981.

en.wikipedia.org/wiki/Project_