Nearly 50 years after a US air force B-52 bomber carrying nuclear weapons crashed in Palomares in south-east Spain, Washington has finally agreed to clean up the radioactive contamination that resulted from the crash.

The US secretary of state, John Kerry, and the Spanish foreign minister, José Manuel García-Margallo, signed an agreement in Madrid on Monday to clean up the site and “store the contaminated earth at a suitable location in the United States”.

It is thought the radioactive material will be shipped to an area of Nevada already contaminated from nuclear bomb tests carried out in the 1950s.

The Palomares crash was the worst nuclear accident of its time. On 17 January 1966, at the height of the cold war, the B-52 bomber collided with a KC-135 tanker plane during mid-air refuelling off the coast of Almería, Spain, killing seven of the 11 crew members.

The B-52 was carrying four hydrogen bombs more powerful than those dropped on Hiroshima and Nagasaki. Two were recovered intact from the sea but the others leaked radiation into the surrounding countryside when their plutonium-filled detonators went off, strewing 3kg of highly radioactive plutonium 239 around Palomares.

Shortly after the accident, the US shipped 1,700 tonnes of contaminated earth to South Carolina, after which the incident was largely forgotten. Worries that it would destroy the budding Spanish tourist industry led the minister of tourism under the dictator Gen Franco, Manuel Fraga, to take a much-photographed swim in the sea with the American ambassador to prove that the waters were safe.



1966: Spanish foreign minister Manuel Fraga swims in the sea off Palomares with the US ambassador, Angier Biddle Duke. Photograph: Gianni Ferrari/Cover/Getty Images

2015: US secretary of state John Kerry and Spanish foreign minister José Manuel García-Margallo sign the deal to clean up the Palomares crash site. Photograph: Ballesteros/EPA

Concern over the site was reawakened in the 1990s when tests revealed high levels of americium, a decay product of plutonium, and further tests showed that 50,000 cubic metres of earth were still contaminated. The Spanish government appropriated the land in 2003 to prevent it being used.

In a joint press conference with Kerry in Madrid, Margallo said the process would begin soon but gave no details.

The Palomares clean-up deal is seen by many as a sweetener in exchange for Spain agreeing to Washington ramping up its military presence in the country. The number of marine personnel at the base in Morón in southern Spain is to be increased from 850 to 2,200, and to 3,000 in the event of a crisis.

Meanwhile, the US navy base at Rota, near Cádiz, is set to become the largest in the Mediterranean.

A US soldier looks through the material found after the Palomares crash. Photograph: National Archives/Associated Press

Talks with Spain’s rightwing government over the military build-up have intensified in recent months amid fears that a government less sympathetic to Washington’s strategic aims may be elected in December.

Barack Obama said during the King of Spain’s visit to Washington in September that a change of government might harm bilateral relations.

Kerry refused to comment on the possible outcome of the election but said that the US supports “a strong and united Spain”, a clear reference to the Catalan region’s aspiration to break away and become independent.

• This article was amended on 28 October 2015 because americium is a product of plutonium decay, not an isotope of plutonium as an earlier version said.