Tribesmen freed six U.N. aid workers in Yemen Thursday, two days after they were kidnapped to secure the release of a jailed man from police custody, one of the hostage-takers said.

The government had earlier said the aid workers - a German, a Palestinian, an Iraqi, a Colombian and two Yemenis who were seized Tuesday - had been released, but the tribal source said the kidnappers had made a last-minute demand for a fellow tribesman held by police be handed over to them first.

We freed the hostages after we received the man held by the authorities, the kidnapper told Reuters by telephone.

Electricity and Energy Minister Saleh Sumai, who led the negotiations with the kidnappers, confirmed the hostages were handed over to him and said they were on their way to the capital, Sanaa.

A U.N. source said the six worked at the Office for the Coordination of Humanitarian Affairs (OCHA).

Kidnappings are common in Yemen, where hostages are often used by disgruntled tribesmen to press their demands on authorities, and are usually freed unharmed.

One of the kidnappers had earlier said there were also delays due to one of the hostages falling ill. He said the hostage's health had improved after receiving medical treatment.

The United States and Saudi Arabia are worried that political unrest could give al Qaeda's Yemen wing the opportunity to gain more control of the impoverished country.

In southern Yemen, five Islamist militants were killed in clashes with government soldiers, a security source said, in escalating violence ahead of a presidential election this month.

Protests have continued even after President Ali Abdullah Saleh transferred his powers and bowed to a year of mass protests demanding the end of his 33-year rule.

Activists demand that Saleh, who is in the United States for medical care, be tried for alleged killings of protesters, and the government be purged of his relatives.

Yemenis are due to go to the polls on February 21 to vote for a new president. Many fear that a wave of violence in Sanaa could escalate to derail the vote.

The defense ministry said late Wednesday that a leading member of the security forces escaped an assassination attempt in Sanaa.

(Reporting by Mohammed Ghobari in Sanaa and Mohammed Mukhashaf in Aden, additional reportinhg by Nour Merza in Dubai; Writing by Nour Merza and Sami Aboudi)