(CNN) -- Two Kenyan aid workers who had been held by the al Qaeda-linked militant group Al-Shabaab since 2011 have been rescued near Somalia's border with Kenya, the African Union Mission in Somalia said Friday.
The rescue was carried out on the outskirts of Dhobley town in Somalia by peacekeepers for the mission, known by the acronym AMISOM, who were working with Somali forces, AMISOM said in a news release.
One of the rescued, James Kiarie Gichoi, was working for Care International when he was kidnapped near the Dadaab refugee camp in Kenya.
The other, Daniel Njuguna Wanyoike, was working as a driver's helper for a company contracted by the aid group Medecins Sans Frontieres when he was kidnapped in Afmadow, a nearby town in Somalia.
Both men were receiving treatment Friday at an AMISOM medical facility in nearby Dhobley, Somalia, and were expected to be repatriated to Nairobi, Kenya.
AMISOM forces working with the Somali National Army have mounted an offensive that has liberated 10 towns that were among Al-Shabaab's strongholds, said AMISOM, the African Union peacekeeping mission in Somalia.
Al-Shabaab, designated a foreign terrorist organization by the United States, has a relationship with al Qaeda that goes back several years. In 2012, the two groups effectively merged, said CNN national security analyst Peter Bergen.
Al-Shabaab hopes to turn Somalia into a fundamentalist Islamic state, but has launched attacks in other countries as well.
In 2010, Al-Shabaab claimed responsibility for two suicide bombings in Kampala, Uganda, amid crowds of soccer fans watching televised screenings of the World Cup final. The bombings left 74 people dead.
The group said the attacks were retaliation for Ugandan participation in AMISOM. One AMISOM goal is to support Somali government forces in cracking down on Al-Shabaab.
Al-Shabaab has also mounted many smaller attacks against targets in Kenya, hurling hand grenades into nightclubs, restaurants and schools. The group has also kidnapped tourists and aid workers.
The group claimed responsibility for the September siege of the Westgate mall in Nairobi on September 21 that killed at least 67 people.
Al-Shabaab said the attack was retaliation for Kenya's involvement in the African Union effort against the group.
In recent months, Al-Shabaab's haven in south-central Somalia has been increasingly squeezed as Kenyan forces have fought the group from the south and African Union forces come down from Mogadishu, the Somali capital.
CNN's Barbara Starr contributed to this report