Yemen has freed more than 600 Shia rebels as part of an amnesty that it hopes will end three years of fighting in the north of the country.

Battles between government forces and rebels belonging to the Shabab al-Moumin, the Youthful Believers - a radical element from the largely peaceful Zaidi sect, have badly damaged Yemen's image and the attempt to revive its tourism industry.

The official death toll since fighting broke out around Saada in 2004 is at least 600, but unofficial estimates of the real number run as high as 2,000. Now the government hopes it is close to solving the dispute.

On the surface, the conflict looks like a religious dispute. There are hardline pro-Iranian clerics among the rebels who have denounced America and demanded that Yemen be ruled once more by an imam, as it was before an Egyptian-backed coup in 1962.

However, the fight has deep political overtones as well. The president and others in power are Zaidis. In the past, the Zaidi rebels were supported by the government as it sought to balance the growing influence of more hardline Sunni movements.

Many say now that the dispute is about sectarian divisions, dissatisfaction with the weak, central government and frustration at widespread corruption.

In late 2004, government forces killed the rebel leader, Hussein al-Houthi, a former MP. But his death did not end the conflict and his father, Badreddin al-Houthi, has continued the campaign.

In the most recent clash last month, at least 20 people were killed - mostly rebels. An amnesty was announced in September, but has yet to quell the violence. A new provincial governor as been appointed in the region. He is regarded as more moderate and diplomatic than his predecessor, who took a tough line with the rebels.

The Saada crisis dominates the political debate in Sana'a. In one recent meeting in the Yemeni capital, representatives from the government and the rebels, as well as other opposition politicians, sat down in the same room for talks while they chewed qat leaves, the country's favourite stimulant.

"The government wants to avoid escalating the crisis," said Sheikh Yasser al-Awadhi, a senior figure in the ruling Congress party. "We may stop the war, but the problem is bigger than the fighting. We need to get everyone round the negotiating table."

Those on the side of the rebels say that the dispute is deep rooted. Hassan Zaid, a leader of the Hezb al-Haq party, which is close to the rebels, said the Zaidis from the north faced sectarian problems in this largely Sunni country.

It was hard for them to find work and there were severe restrictions on the religious books they are allowed to use for teaching. "If you look at what is happening in Yemen it is just like Iraq: there is a clear sectarian war," he said. "We have to reach the point where we accept that there are different sects just like there are different political parties."

Sitting next to him was one of the founders of the Youthful Believers rebel group. "A tank cannot change the way we think, but dialogue can," said Abdul Karim Azam.

The government has frequently taken a heavy-handed approach to the Saada crisis. Abdul Karim al-Khaiwani edited a newspaper that aired the grievances of the Zaidi rebels. After a series of articles critical of the government, exposing corruption and condemning the military campaign against the rebels, he was put on trial in August 2004 for insulting the president and jailed for seven months.

Following his release, al-Khaiwani's paper was effectively taken over by a pro-government group and he was left without a job. "In front of the international community the government says this problem is about hardliners chanting slogans against America and Israel. But this is not the case. It's not a matter of terrorism at all," he said.

At the heart of the dispute was a row over the legitimacy of the government, the powerful influence of the military and security services in Yemeni life, and the state's close relationship with hardline Sunni militant groups. "It's really about politics, but now it has become a war of revenge."