Leading world economies agreed on Friday to put the policies of seven major nations under a microscope as part of a plan to prevent a repeat of the global financial crisis.

The pact was agreed by the Group of 20 nations after months of wrangling highlighted by China's fears that its policy of limiting its currency's rise was being targeted.

Under the deal, the International Monetary Fund will look at national levels of debt, budget deficits and trade balances to determine if a nation's policies are putting the global economy at risk and should be changed.

One potential shortcoming is that countries will not be bound to follow any recommendations that emerge.

French Finance Minister Christine Lagarde said the agreement marked huge progress on the path to more balanced world growth and said seven major economies would automatically be subject to review. Others could face scrutiny as well if their policies are found to be stoking global risks.

The net is a little bit tighter for those countries that are considered of systemic importance, Lagarde said.

France is president of the G20 this year.

Countries representing more than 5 percent of the combined output of the G20 will be examined by the IMF under the deal.

The list would include the debt-burdened United States and export-rich China -- the two main economies at the heart of the debate over global imbalances. France, Britain, Germany, Japan and India would round out the list, officials said.

Our aim is to promote external sustainability and ensure that G20 members pursue the full range of policies required to reduce excessive imbalances, G20 finance officials said in a communique issued at the close of a full-day meeting.

Many economists say global imbalances -- notably the gaping and persistent U.S. trade gap and correspondingly large surplus in China -- laid ground for the 2007-2009 crisis, which ended with the worst global recession since World War II.

The G20 has become the main forum to prevent similar boom-bust cycles. Agreeing on how best to do that has grown difficult now that the darkest days of crisis have passed.

Eswar Prasad, a senior fellow at the Brookings Institution and former IMF official, said the real test of the latest plan from the G20 rich and emerging economies will come once all the numbers are filled in and countries have to answer for policies that are deemed a danger to the world.

Once the numbers are put on the table, that's when you'll start to see the pushback, he said.

The G20 appeared to offer room for countries to sidestep criticism. National circumstances will ... be taken into account, it said without elaboration.

It said the global recovery was strengthening but warned of continued risks, including the political unrest in the Middle East and North Africa and the disasters in Japan.

PROGRESS ON CAPITAL CONTROLS

Officials also agreed to keep working on a framework for determining when countries can use controls over capital inflows -- a sensitive topic for emerging market nations that are fighting inflation stoked by hot money from countries with low interest rates, such as the United States.

Brazil has resisted efforts to restrict the use of capital controls. We don't want high levels of global liquidity to turn into problems for the Brazilian economy, the country's central bank chief, Alexandre Tombini, said on Friday.

European Central Bank Governing Council member Christian Noyer said officials made enormous progress on the issue.

We do not any more have two fronts, one saying there should be total freedom and never any measure taken, and the other saying each country should have total faculty to do whatever it feels necessary, he said.

Policymakers from advanced economies, led by the United States, have argued that emerging nations can combat inflows and price pressures by allowing their currencies to strengthen against the dollar. They say if countries such as China were to do so it would help balance world trade.

Emerging nations, in contrast, blame near zero interest rates in the United States for sending investors elsewhere in the search for returns. Despite efforts by Brazil to weaken its real currency, it hit a near two-year high this week.

While China had been especially wary about the effort to set up a monitoring process, it welcomed the G20 accord.

Chinese Vice Finance Minister Zhu Guangyao said the agreement fully reflects each country's demands, including reforming the international financial system and strengthening financial regulation.

We're satisfied with the results, he said.

Lena Komileva, an economist at Brown Brothers Harriman, said officials were still a long way from securing the future of the world economy.

The global recovery has been achieved at the price of a record U.S. budget deficit and overheating in emerging markets such as China, she said. This is not a sustainable platform for global economic stability.

(Reporting by Reuters IMF/G20 team; Writing by Steven C. Johnson and Glenn Somerville; Editing by William Schomberg, Leslie Adler and Tim Ahmann)