Did Francisco Franco have a nuclear weapons program? If so, did Francoist Spain ever come close to developing a nuclear weapon?
I have never heard anything about a Francoist nuclear weapon program. The only thing I have heard, one way or another, is that Spanish physicists who were interested in Inertial Confinement Fusion in 1966 were forced by Franco himself to cancel the work, because he did not want to possibly endanger their relationship with the United States (which had, in Franco's eyes, gotten better after the Palomares accident, because it allowed him to have closed coordination with the US). ICF is not a bomb program, but the physics is close enough to thermonuclear weapons that the US was not fond of other countries working on it in the 1960s, and so it seems that Spain pre-emptively shut their program down to avoid US attention. Some of the work was restarted in the 1970s when the US declassified some of their ICF work.
Source: Guillermo Verarde, "Inertial Confinement Fusion Research in Spain: from a Difficult Beginning to a Hopeful Future," in Guillermo Velarde and Natividad Santamaria, eds., Inertial Confinement Nuclear Fusion: A Historical Approach by its Pioneers (Foxwell & Davies, 2007), 187-213, esp. 187-190.
There is some indication that the idea was at times considered under Franco, but never pursued
During the Franco dictatorship, some consideration was given by the Spanish government to the idea of building a nuclear weapon. Spain had engaged in an aggressive campaign to develop its civilian nuclear energy sector in the early 1970s: a number of feasibility studies assessing the option of building a nuclear bomb were commissioned. However, these plans were eventually relinquished on account of technical and economic difficulties.
I would not call that level of discussion "a nuclear weapons program" (any more than my assigning undergraduates a homework assignment of "what would it take for our university to develop a crude nuclear weapon" — which I sometimes do — a "nuclear weapons program"). If they are not actually building reactors, enrichment facilities, planning designs, etc., then it is not a real nuclear program. To put it another way: if the thing only exists on paper, it is nowhere close to being "real." Even if it exists as pilot studies (as was the German program in WWII), it is still a long way away from a weapons production program.
Source: Clara Portela, "The rise and fall of Spain's ‘nuclear exceptionalism’," European Security (2014).