The measures are designed to combat illegal evasion of taxes, as well as legal tax avoidance by large corporations that make use of loopholes and tax havens.

The summit in Northern Ireland also saw the launch of free trade negotiations between the EU and US, which UK Prime Minister David Cameron, who was hosting the summit, dubbed "the biggest bilateral trade agreement in history".

Tax, trade and transparency - dubbed "The Three Ts" - were placed at the top of the UK's agenda for its presidency of the G8, which consists of the UK, US, Germany, France, Italy, Russia, Canada and Japan.

But the summit has been overshadowed by the conflict in Syria.

The G8 leaders - including Russian President Vladimir Putin, an ally of Syrian leader Bashar al-Assad - backed calls for Syrian peace talks to be held in Geneva "as soon as possible".

Mr Cameron said the leaders had managed "to overcome fundamental differences", but no timetable for the Geneva talks was given, and the statement made no mention of what role Mr Assad could play in the future.

Shadowy arrangements

Leaders agreed that multinationals should tell all tax authorities about what taxes they pay and where.

"Countries should change rules that let companies shift their profits across borders to avoid taxes," the communique said.

It follows revelations about the ways in which several major firms - including Google, Apple, Starbucks and Amazon - have minimised their tax bills.

Illegal activities, including tax evasion and money laundering, will be tackled by the automated sharing of tax information.

Ahead of the summit, the Organisation for Economic Co-operation and Development (OECD), proposed to share tax information by building on an existing system set up by the US and five major European economies, but on a global scale.

"This international tax tool is going to be a real feature of ensuring that we get proper tax payment and proper tax justice in our world," said Mr Cameron, who claimed that it meant "those who want to evade taxes have nowhere to hide".

The OECD includes all of the G8 members except Russia.

Among the information to be shared will be who actually ultimately benefits from the shadowy shell companies, special purpose companies and trust arrangements often employed by tax evaders and money launderers.

Earlier in the day, Chancellor George Osborne unveiled plans for a UK register of companies and their owners.

The White House also announced a similar plan for the US.

Last week the UK also unveiled a deal with its crown dependencies and overseas territories - including the Channel Islands, Gibraltar and Anguilla - to start sharing more information on which foreign companies bank their profits there.

About a fifth of offshore tax havens, which are used by multinationals to shelter cash from the tax authorities, are British dependencies.

"Of course Britain's got to put its own house in order," said Mr Osborne, adding that the government would launch a consultation on whether the register should be published or just be available to the HMRC.

Speaking during the summit, Mr Osborne said more progress had been made on reforming the global tax system in the past 24 hours than the "past 24 years".

Conflict zones

The G8 communique also demanded more transparency from mining firms.

It follows revelations that many major mining companies use complex ownership structures in the Netherlands and Switzerland to avoid paying taxes on the minerals they extract in developing countries.

"Developing countries should have the information and capacity to collect the taxes owed them," the communique said.

"Other countries have a duty to help them."

The governments agreed that mining companies should disclose all the payments they make, and that "minerals should not be plundered from conflict zones".

"We agreed that oil, gas and mining companies should report what they pay to governments, and that governments should publish what they receive, so that natural resources are a blessing and not a curse," said Mr Cameron.

Ransom crackdown

The G8 leaders also agreed to stamp out ransom payments to kidnappers for the release of hostages.

Mr Cameron said tens of millions of dollars in ransom money had been paid around the world in the last three years.

UK government officials have often expressed their frustration at alleged ransom payments being made to secure the release of French, Italian and other European hostages seized in the Sahara and elsewhere, says the BBC's Security correspondent Frank Gardner.

But since those governments have never publicly owned up to paying ransoms this G8 agreement may be easier to sign than to enforce, he adds.