An American and a Danish hostage have been rescued from Somali pirates after three months in captivity, a local security official and the aid group they work for said Wednesday.

The Danish Refugee Council hereby confirms that Jessica Buchanan and Poul Hagen Thisted have been rescued earlier today during an operation in Somalia, the aid group said in a statement.

Mohamed Hussein, a military official in Somalia's Galmudug region, told Reuters the hostages were freed after an operation involving U.S. military helicopters.

(Reporting by Abdi Sheikh in Mogadishu and John Acher in Copenhagen; Editing by Richard Lough and Louise Ireland)