NAIROBI, Kenya — Two Spanish aid workers kidnapped by Somali militants from a Kenyan refugee camp in October 2011 have been released, ending a 21-month hostage ordeal, the aid group Doctors Without Borders said Thursday.

Doctors Without Borders said the two women — Montserrat Serra and Blanca Thiebaut — are both safe and healthy and are eager to join their loved ones. The group thanked those involved with securing the women's release but did not specify who that was.

"As we are still working on the return of the two girls to their homes, we ask you to respect their need for privacy at this time," Doctors Without Borders said.

Somali militants entered the world's largest refugee camp — Dadaab, in eastern Kenya — in October 2011 and took the two women after shooting and wounding their Kenyan driver. The attack was the third kidnapping of Europeans in Kenya in six weeks and was one of the reasons Kenya gave for sending troops into Somalia days later.

Kenya's military deployed troops and six helicopters to hunt for the kidnapped women. Security forces found their vehicle abandoned and mired in the desert, meaning the women were forced to march on foot into their captors' lawless country.

At the time of the kidnapping Serra —from Girona, in northeast Spain — was 40 and Thiebaut — from Madrid — was 30.

The kidnapping forced aid agencies to scale back relief operations in Dadaab. The United Nations temporarily suspended all non-lifesaving aid operations, and hundreds of staff were confined to their offices, forcing the cancellation of services like education, counseling and relocation of families until further notice.

Security at Dadaab remains a concern for Kenya's government still today. Militants are known to recruit disaffected young male refugees as fighters. Aid workers live in guarded compounds surrounded by high barbed-wire walls, and the U.N. requires its staff to travel in the camps with armed escorts.

Since the 2011 kidnapping, the camp has suffered from a series of explosive attacks often aimed at Kenyan police.

Only days after the kidnappings of the Spanish women Kenya sent thousands of military forces over the border into Somalia to fight al-Shabab militants. The Kenyan troops — now a part of the African Union military mission — remain there today.