Muhammad Ibrahim, the Sudanese deputy foreign minister, 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 have 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.
On 23 December, Khartoum said six Sudanese nationals, including the embassy's second secretary Abd al-Munim al-Huri and four embassy employees, had been seized by unknown assailants while leaving a mosque in the Iraqi capital.
The sixth hostage, whom Khartoum had called "a friend" of one of the employees, was not mentioned by the group.
Earlier, Aljazeera reported that the Sharia Association for Scholars and Preachers in Sudan had urged the Sudanese government to tackle the crisis "wisely", even if that led to the withdrawal of the country's diplomatic mission from Iraq.
The association also urged the captors not to rush into a decision with regard to the hostages but to give negotiations a chance to avoid bloodshed.