Barack Obama with the Russian and French presidents, Dmitry Medvedev (left) and Nicolas Sarkozy, at the G8 summit in Deauville Photograph: Jeff J Mitchell/Getty Images Europe

Britain is to set aside £110m over the next four years to foster democracy and economic growth in Tunisia and Egypt as part of a wider international package to show support for the Arab spring.

David Cameron, speaking on the opening day of the G8 summit of leading economies in Deauville, Normandy, argued that if Britain did not help the fledgling democracies of north Africa the result would be poisonous extremism and waves of illegal immigration into the UK.

The G8 is hammering out a wider package of aid to north Africa as the centrepiece of its two-day deliberations.

Cameron said: "I want a very simple and clear message to come out of this summit and that is that the most powerful nations on Earth have come together and are saying to all those in the Middle East and north Africa who want greater democracy and greater freedom and greater civil rights – we are on your side."

He added: "We'll help you build your democracies; we'll help you build your economies; we'll help you with trade – we'll help you in all the ways that we can, because the alternative to successful democracies is more of the poisonous extremism that has done so much damage in our world.

"And to people back at home wondering what is the relevance of summits like this, it will mean less extremism, it will mean more peace and prosperity, and it will mean there won't be the pressures of immigration that we might otherwise face in our own country."

The Tunisian and Egyptian economies have been floundering since the spring revolutions because of a collapse in tourism and trade. Egypt claims political instability is costing it $40m (about £25m) a day in lost tourism revenues, while growth has more than halved and inflation has risen.

The leaders of both countries – the Egyptian prime minister, Essam Sharaf, and the Tunisian prime minister, Beji Caid el Sebsi, are both due to address the G8 leaders on Friday. The Tunisians are asking for $5bn a year for the next five years, pointing out they have suffered an influx of immigrants from Libya. The extra cash, including soft loans, multi-creditor debt swaps, and greater trade access for agricultural products, would come as tensions mount inside both countries over the slow pace of reform and continuing mass unemployment.

The US is the largest contributor, offering $4bn in aid and loans, but help will also come from the World Bank, the International Monetary Fund and the European Union. The US has also urged the G8 to "lead efforts to reorient" the European Bank for Reconstruction and Development to back Arab democratic transitions in much the same way as it supported similar transitions in central and eastern Europe.

Some Egyptian protesters are due to return to Tahrir Square in Cairo this Friday to demand faster progress towards reform and removal of the military junta, the Supreme Council of the Armed Forces. But the protesters, who call their protest Save the Revolution Friday, are split, with the Muslim Brotherhood, the likely beneficiary of early elections, refusing to join them.

Britain recognises that premature elections may make it difficult for some of the newer parties in Egypt to establish themselves, but recognises there is an impatience for democracy.

The UK funding will include £40m from the Foreign Office over four years to bolster political reform and a further £70m from the Department for International Development.

The Foreign Office money will be used to build political participation, support human rights groups and challenge corruption. It appeared none of the cash would go to the Muslim Brotherhood on the grounds that it is an already well-established party.

Speaking before the meeting, the European commission president, José Manuel Barroso, confirmed that the 27-member EU would provide €1.24bn (£1bn) in "fresh new money" to its neighbours in the east and across the Mediterranean.