WASHINGTON — Washington and Madrid signed a deal Wednesday setting up a permanent force of 2,200 US Marines based in southern Spain who can be swiftly deployed to crises in Africa.

The US already has a rapid reaction force of about 800 troops at Morón de la Frontera, near Seville, who were deployed temporarily in the wake of the 2012 attack on a US mission in Benghazi, eastern Libya.

Four Americans, including the ambassador Chris Stevens, were killed when dozens of armed militants stormed the compound and a nearby CIA facility in an hours-long gunbattle, which triggered protests that no US troops could be deployed fast enough to help them.

"The deployment at the Moron base will be made permanent with a force of 2,200 military personnel and 500 civilian staff plus 26 aircraft," Spain's Deputy Prime Minister Soraya Saenz de Santamaria said late last month.

Top US diplomat John Kerry had been due to sign the deal on his first trip to the country as secretary of state in May.

But he fell while cycling in the Alps and had to be flown home to Boston for surgery to a broken right leg, forcing him to cancel the visit.

Wednesday's accord, which amends a 1988 defense partnership between the two countries, was signed instead by Deputy Secretary of State Tony Blinken and Spanish Deputy Foreign Minister Ignacio Ibanez.

The main mission of the Special-Purpose Marine Air-Ground Task Force Crisis Response unit will be to protect US embassies in Africa, evacuate civilians in difficulty, or intervene in conflicts or humanitarian crises.

× Fear of missing out? Sign up for the Early Bird Brief, the defense industry's most comprehensive news and information, straight to your inbox. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

It will come under the US military command for Africa (AFRICOM) which is based in Stuttgart, Germany.

Blinken said Washington was very "grateful to our Spanish allies and friends for this agreement," which showed that the partnership between the two countries "every day grows stronger."

Ibanez welcomed the signing, saying it was a "very important agreement."