SANAA (Reuters) - Yemen's opposition said on Monday it had finalised a deal with President Ali Abdullah Saleh under which he is to transfer his powers to his deputy, in a move to end 10 months of popular protests that have pushed the country to the brink of civil war. Saleh has three times backed down from signing an initiative presented by the six-member Gulf Cooperation Council (GCC) calling for the president to hand over his powers to his deputy, Abd-Rabbu Mansour Hadi, ahead of an early presidential election. Mohammed Basindwa, head of the opposition National Council, said an agreement has been reached on an operational mechanism that had been demanded by Saleh, and was expected to be signed on Tuesday. "Everything has been agreed upon, and the president is supposed to sign the Gulf initiative tomorrow (Tuesday). The opposition and the vice president will also sign the operational mechanism," Basindwa told Reuters. Yemen has been paralysed by months of protests that have weakened the government's control on the country and allowed militants to take hold of swathes of the country in the south. The violence has triggered fears that it could affect neighbouring Saudi Arabia, the world's largest oil exporter which shares a long border with Yemen. The agreement came about following intervention from US and European diplomats who put pressure on both parties to make compromises, opposition sources said. A source in Saleh's General People's Congress (GPC) ruling party said the agreement had been ready for several days but a party in a an opposition alliance had been against the deal. Under the agreement, opposition officials said Saleh would retain the title of president but without any powers. They said one of the last sticking points had been over whether a military committee being set up to oversee the armed forces would have the power to sack commanders who refuse to obey orders. Saleh agreed to give the committee such powers because it would be led by Hadi, they said. Opposition officials said the presidential election was expected to be held in January. The GPC source said the vice president would have powers to implement the Gulf initiative, appointing a new government that would take the oath before him and call the presidential election. He said Saleh would remain president and that his powers would be "within these limits". "He will remain the constitutional president and will also be the head of the General People's Congress," he told Reuters. The source said one of the risks to the agreement was that dissident military commander, Ali Goshen, and tribal chief Sadeq al-Ahmar were not part of the accord. "One of them has the military power and the other has the money, and their power is greater than the coalition alliance," the source said. Meanwhile, Yemeni tribesmen opposed to President Ali Abdullah Saleh said they stormed a military base near the capital used by troops loyal to Saleh on Monday and made off with weapons. Hameed Asim, a leader of tribesmen who have skirmished with troops from the Republican Guard led by Saleh's son, said tribal fighters killed several troops and lost seven of their own in a raid on the base north of the capital, before withdrawing. The attack was the latest in a series of running battles between tribesmen in the Arhab region north of the capital Sanaa and forces backing Saleh, who is clinging to power despite 10 months of protest demanding his overthrow and a slide towards civil war on the borders of oil giant Saudi Arabia. It follows reports of progress in talks to implement a plan crafted by Yemen's Gulf neighbours to ease Saleh from power, which opposition political factions say have been stuck on the question of formal command of the national army. The political standoff in Yemen has re-ignited conflicts with separatists and militants who have seized territory in the south, alarming Riyadh and Washington, which funded Saleh as part of its campaign against al Qaeda. Saleh has wriggled on three occasions out of the power handover plan backed by the Gulf Cooperation Council and mirrored in a UN Security Council resolution, which a United Nations mediator is trying to put in place. The crisis over Saleh's fate has brought almost complete economic paralysis and periodically halted oil production in one the world's poorest countries, which depends on crude exports for revenue to fund imports of staple foodstuffs.