Yemeni Prime Minister Mohammed Basindawa speaks during a celebration in the capital Sanaa on September 26, 2012, marking the 50th anniversary of the uprising that overthrew the imamate -- the Zaidi Shiite theocracy that ruled the north before the establishment of the republic. In comments intended mainly for leaders from the former South Yemen who have been living in exile since 1994 after they failed to break away from the North, Yemeni President Abdrabuh Mansur Hadi said that he is ready for dialogue with militants of Al-Qaeda, but only if they give up their weapons and show repentance. AFP PHOTO/MOHAMMED HUWAIS (Photo credit should read MOHAMMED HUWAIS/AFP/GettyImages)

(Reuters) - Yemen's prime minister submitted his resignation to President Abd-Rabbu Mansour Hadi on Sunday amid chaos over reported advances by Shi'ite Muslim Houthi rebels on some military buildings and government offices in the capital.

The move by Mohammed Salem Basindwa added to the confusion in Sanaa, where Houthi rebels were due to sign a deal, brokered by U.N. special envoy Jamal Benomar, intended to end the fighting and pave the way for a new government within two weeks.

Sanaa residents said the Houthis had taken over several government sites including the prime minister's buildings, an army command center and the state television compound after security forces withdrew - although TV broadcasts continued.

The fighting in Sanaa threatens a U.N.-backed transition to democracy that began after veteran President Ali Abdullah Saleh was forced to step down in 2012 after months of protests against his 30 years in office.

"I have decided to tender my resignation from the government (of national reconciliation) out of my concern to pave the way for any agreement reached between the brother leaders of Ansarullah (the Houthis) and brother Abd-Rabbu Mansour Hadi, the president of the republic," Basindwa wrote in the letter, a copy of which was seen by Reuters.

There was no immediate word from Hadi's office about the resignation. Basindwa took office as head of a national unity government in 2011 under a Gulf-brokered power transfer deal that saw Saleh agree to step down.

The Houthis, who stayed out of Basindwa's government, have pressed for a new administration. Last month, they began a wave of demonstrations in Sanaa to protest against a raise in fuel prices, a move that had been taken to curb the rising budget deficit. The protests later escalated into armed clashes.

ADVANCE

Yemeni officials estimate that more than 100 people have died in the fighting, which has largely been concentrated in northern Sanaa near the headquarters of the First Armoured Division, a force loyal to an army general viewed by the Houthis as linked to hardline Sunni Islamists hostile to them.

One resident in the area said on Sunday he had counted at least 10 bodies -- six Houthi fighters and four uniformed soldiers -- killed in the fighting.

Benomar, who held talks with Houthi leader Abdulmalek al-Houthi in his home province of Saada on Wednesday and Thursday, announced late on Saturday that an agreement had been reached and was to be signed on Sunday.

The accord calls for the creation of a new national unity government which will bring in the Houthis and mostly reverse the unpopular decision to increase fuel prices.

Yemeni officials said Houthi's representatives flew to Sanaa to sign the deal at a ceremony expected to be attended by Hadi, who continues to support the deal despite the latest fighting.

The picture appeared murky but residents said Houthis gained control of some vacant government buildings, including the prime minister's building and a building belonging to the army general command after security forces vacated them.

The Interior Ministry's website said the minister has instructed security forces to avoid clashing with the Houthis.

One Houthi rebel leader told Reuters late on Saturday his group had stepped up shelling of government forces and had driven soldiers out of the state television headquarters.

"We controlled a military unit east of the First Armoured Division .... and we continued heavy shelling of the division headquarters and the nearby Iman university in all directions," Ali al-Emad said.

CURFEW

Students and security guards at the university run by Abdel-Majeed al-Zindani, a prominent cleric who is on a U.S. terrorism blacklist, were later forced to quit the campus due to the Houthi attacks, a university official told Reuters on Sunday.

Fighting raged throughout Saturday on the outskirts of Sanaa and the rebels said they had taken control of the headquarters of state television, though broadcasting continued from a different location.

Yemen's Higher Security Committee announced a curfew in four areas of the capital from 9 p.m. until 6 a.m. and schools have been shut until further notice.

Insecurity and political turmoil have grown since Saleh was ousted by Arab Spring protests. The Houthi insurrection is only one of several threats to the stability of Yemen, which borders oil exporter Saudi Arabia and is struggling with a secessionist movement in the south and a spreading al Qaeda insurgency.

The Houthis have been struggling for a decade against the Sunni-dominated government for more territory and autonomy in the north.

(Reporting By Mohammed Ghobari; Writing Sami Aboudi and Maha El Dahan,; Editing by William Maclean and Dominic Evans)