Updated

President Robert Mugabe relaxed his iron hold on Zimbabwe for the first time in nearly three decades of one-man rule, forced by escalating economic chaos into signing a power-sharing deal Monday with his bitter political rivals.

Thousands of supporters of the rival parties threw stones at each other outside the convention center where the signing ceremony took place. Police fired warning shots and set dogs on the crowd but several hundred broke through the gates onto the sprawling grounds. The crowd calmed after the initial clashes and cheered as the leaders left.

Mugabe, main opposition leader Morgan Tsvangirai and Arthur Mutambara, leader of a faction that broke away from Tsvangirai's party, all pledged with passion to make the deal work. But long-simmering and bitter differences between the two sides and the nation's worsening economic collapse are expected to put the power-sharing deal under intense pressure.

Western nations, whose aid and investment could mean the difference between the success or failure of the unity experiment, reacted cautiously. Millions of dollars in aid are expected if Mugabe proves genuine about sharing power and working to end Zimbabwe's economic and political crisis.

The European Union welcomed the deal but officials said it was still too early to ease sanctions against Mugabe. The United States expressed cautious optimism.

Mugabe, 84, has been in power since independence in 1980 and went from being praised as a liberator to being vilified as an autocrat. He and Tsvangirai, 56, have been enemies for a decade, and Tsvangirai has been jailed, beaten, tortured and tried for treason — charges that were dismissed in court.

The deal is the result of more than two months of difficult negotiations mediated by South African President Thabo Mbeki. Mbeki said Mugabe would remain president, Tsvangirai would be prime minister and Mutambara deputy prime minister.

The first 30 pages of the 80-page deal were made public after the deal was signed.

The deal lays out a complicated arrangement with Mugabe chairing the Cabinet and Tsvangirai heading a new Council of Ministers responsible for forming government policies. Tsvangirai is deputy chairman of the Cabinet under Mugabe.

The agreement sets out a timetable for drafting a new constitution that would include input from civic groups. The consultation process is to begin within a month and a referendum on the constitution is slated to take place within two years.

The deal also promises the start of a process of re-registering and licensing media organizations under eased press laws in a new "open media environment."

Zimbabwe's draconian media laws prohibited any journalist or media organization not approved by the government from operating. Even licensed journalists have been arrested and attacked.

In a nationally televised speech after signing the agreement before diplomats, Zimbabwean officials and other African leaders, Tsvangirai said the government's first priority should be addressing hunger.

The world's highest inflation — and a meager harvest this year — has made it difficult for many Zimbabweans to feed themselves in what was once the region's breadbasket. In addition, Mugabe's government in June restricted the work of aid agencies, accusing them of siding with the opposition before a presidential runoff. The ban was lifted last month, but aid agencies say it takes time to gear up.

Before the ban was lifted, U.N. humanitarian agencies had predicted the number of Zimbabweans who will need help to stave off hunger will rise to more than 5 million by early next year.

Critics have linked Zimbabwe's economic decline to Mugabe's 2000 orders that farms be seized from whites and handed over to poor blacks. Many of the farms ended up in the hands of Mugabe loyalists, and the economy's agricultural base was disrupted. Food, fuel and hospital supplies are scarce, and millions of Zimbabweans — doctors, teachers, businesspeople among them — have fled the country in search of work.

The deal describes the seizure of the farms as irreversible and say Britain should compensate those whose land was taken.

Tsvangirai, blaming the "the policies of the past" for today's problems, said: "Under my leadership, this unity government will let businesses flourish so our people can work and provide for their families with pride."

Still, Tsvangirai said Zimbabweans faced the option of uniting the country and moving forward or letting the impasse "plunge our country into the abyss of a failed state."

He saluted members of parliament for their willingness to work across parties lines. "If you were my enemy yesterday, today we are bound by the same patriotic duty and destiny," he said.

He called for legislators to be "driven by the hope of a new, better, brighter country" and the "hope of a new beginning."

For his part, Mugabe returned to his habitual complaints that former colonial leader Britain was responsible for his country's woes. Mugabe stopped short of repeating accusations Tsvangirai had allowed himself to be used by Britain to bring about "regime change," but said opposition parties across Africa were known for using any means, "including violence" to gain power. In fact, it is Mugabe's supporters who are accused of the worst of the violence surrounding recent elections.

Mugabe added: "We have to walk the same route the same way.

"Are we beginning today? No. We have been walking the same route without knowing it, or not recognizing each other. After all, we are all Zimbabweans and is there any other road, any other route to follow? History makes us walk the same route."

Britain, one of the strongest critics of Mugabe, is expected to offer some immediate humanitarian aid to Zimbabwe following the agreement between Mugabe and Tsvangirai. But officials said Britain will first assess how the coalition is working.

"We hope that the new government will now reverse the tragic policies and decline of recent years," British Foreign Secretary David Miliband said in a statement Monday. "The new government needs to start to rebuild the country. If it does so, Britain and the rest of the international community will be quick to support them."

U.S. State Department spokesman Sean McCormack said that the United States has not seen the full agreement but has been briefed by Tsvangirai's Movement for Democratic Change.

McCormack said that from what U.S. officials have been told, "we would welcome this agreement."

Some opposition members who wanted Mugabe to surrender power completely have complained the power-sharing deal does not go far enough and that it creates an arrangement Mugabe could exploit, especially given the tension that exists between the two opposition factions.

In March's presidential polling, Tsvangirai won the most votes, but not enough to avoid a runoff against Mugabe. An onslaught of state-sponsored violence against Tsvangirai's supporters led him to drop out of the presidential runoff and Mugabe was declared the overwhelming winner of the second vote widely denounced as a sham.