After being held captive for a month, three Americans who were kidnapped in the Iraqi capital have been freed.

Saad al-Hadithi, a spokesman for the prime minister’s office, confirmed that the three had been released but said he had no further details. The State Department said it welcomed the release and thanked Iraqi authorities for their assistance.

The Americans, two men and a woman, were working as contractors training Iraqi security ­forces, according to an Iraqi security official. Apparently, on an unauthorized off-base trip, they were seized in southern Baghdad’s Dora neighborhood in an apartment Iraqi police described as “suspicious.” Some residents described it as a brothel, but details of the kidnapping have remained murky. Other reports have said the group was visiting the home of its Iraqi interpreter.

Shiite militias have a strong presence in the area, a sprawling mixed neighborhood that suffered some of Iraq’s worst violence during the sectarian bloodshed that followed the 2003 U.S. invasion. Gunmen regularly carry out raids and take it upon themselves to enforce moral codes, leading to suspicions that such a group was behind the abduction. Since a call to arms to defend the country from the advance of Islamic State militants in the summer of 2014, Iraq’s Shiite militias have operated with increasing impunity. Senior Iraqi officials have expressed concerns about how they will be brought back under state control.

Iraqi fighters of the Shiite militia Asaib Ahl al-Haq (The League of the Righteous) stand guard outside their headquarters on May 18, 2015, in the mainly Shiite southern city of Basra. (Haidar Mohammed Ali/AFP/Getty Images)

The security official, who spoke on the condition of anonymity because of the sensitivity of the subject, claimed that the Peace Brigades — a Shiite militia headed by Moqtada al-Sadr — “helped release them,” implying that the group may have held sway with the kidnappers. The security official said he was present when the “armed group” handed the hostages over to Iraqi intelligence officials, but he declined to give details of the location of the swap or anything further on who was responsible.

Iraqi security officials have given the names of the abducted individuals as Amro Mohamed, Wael al-Mahdawi and Rusul Farad, but the U.S. Embassy in Baghdad has declined to confirm personal details.

The contractors were the first Americans to be kidnapped since U.S. troops withdrew from the country in 2011, and there were fears that the abduction may have been orchestrated by Iranian hard-liners for political gain. Iran backs and funds a range of Shiite militias in the country.

The name of the company that the Americans were working for has not been released.

The State Department “welcomes the news that the Government of Iraq has secured the release of three U.S. citizens who were reported as missing in January,” deputy spokesman Mark Toner said in a statement. “We sincerely appreciate the assistance provided by the Government of Iraq, and its whole-of-government effort to bring about the safe release of these individuals.”

Read more