(CNN) -- Two Western aid workers taken hostage by Islamist militants in a Somali town near the Ethiopian border Saturday were released within hours, according to their organization.
"They are all right physically," said Karin Viklund, spokeswoman for the Swedish Rescue Services Agency. "They are a bit shocked."
The two workers -- a Swedish and a Danish national -- were taken hostage Saturday by the militants from the Islamist Courts Union, who were taking over the town of Hodur. The militants also seized another Somali town after Ethiopian troops withdrew, a local journalist said.
The workers were helping to educate people about the dangers of unexploded landmines when they were kidnapped, said Kjell Larson, director of international operations for the SRSA.
The group, a Swedish government foreign aid organization that is conducting a "mine risk education" mission in Somalia at the request of the United Nations, Larsson said.
Viklund said the two workers would be removed from Somalia along with the rest of their team.
A local journalist said seven people were wounded in the Hudor fighting, including the district commissioner.
About 200 militants also seized the town of Beledweyne soon after Ethiopian troops withdrew Saturday.
Journalist Mohamed Amiin Adow contributed to this report.