On 23 December, Abd al-Munim al-Huri, the Sudanese embassy's second secretary, along with four embassy employees, were seized by unknown kidnappers as they were leaving a mosque in the Iraqi capital.
The release of the five Sudanese came after Sudan decided to close its embassy in Iraq and pull out its diplomatic mission there.
The al-Qaida network in Iraq had threatened to kill the Sudanese hostages unless the Sudanese embassy in Baghdad closed.
Muhammad Ibrahim, the Sudanese deputy foreign minister, had told Aljazeera on Friday: "Sudan has decided to close its embassy in Baghdad and for all its diplomats to leave Iraq.
"Khartoum seeks the freeing of its nationals held hostage in Iraq," he said.
Ibrahim said all embassy staff had been advised to leave Iraq immediately.
Al-Qaida on Thursday claimed the kidnapping of five Sudanese in an internet statement, giving Khartoum 48 hours to break off diplomatic relations with Baghdad, close its embassy and "withdraw all its representatives" in Iraq.