Finance ministers of leading industrial nations reached an agreement on Saturday that promises some debt relief to 18 of the poorest Third World countries, French Finance Minister Pierre Beregovoy said.

After private talks held during annual meetings of the International Monetary Fund and World Bank, the ministers of the Group of Seven nations also said inflationary pressures in the global economy were being contained.And their communique vowed they would continue operating closely in currency markets, where intervention by their central banks has attempted to stabilize the value of the dollar.

Beregovoy said the Paris Club of Western creditor nations has now definitively adopted guidelines on debt concessions agreed in principle at a Toronto economic summit of the Seven back in June. The concessions affect 18 heavily indebted countries, mostly in Africa.

The French minister said West Germany had until now not agreed to the guidelines. Adoption of them was part of an agreement reached at Saturday's Group of Seven finance ministers' talks. France chairs the informal Paris Club, which handles rescheduling packages on government debts.

Beregovoy called the accord "good news for the world economy."

Rigorous security measures surrounded the talks of the Group of Seven - the United States, Japan, West Germany, France, Britain, Italy and Canada.

Ministers and central bankers of the Seven were whisked in police motorcades to the Villa Borsig, an elegant lakeside mansion fringed by woodland, for their private get-together.

Precautions followed a failed shotgun ambush in Bonn last Tuesday on Hans Tietmeyer, a senior West German finance official who helped organize the Berlin IMF and World Bank gathering.

The institutions are alleged by left-wing foes to have perpetuated Third World poverty and damaged the environment, and a mass demonstration is planned for Sunday.

A plea for leniency by the affluent nations on Third World's $1.2 trillion of debt was made earlier on Saturday by finance ministers of the Group of 24 developing countries at a separate meeting.

The G-24 asked for leniency for nations in arrears to the IMF and World Bank, and called for a limit of debt servicing to a fixed percentage of export earnings.

Its declaration noted pointedly that the Third World had not shared in the economic expansion which the affluent have enjoyed despite last year's "Black Monday" stock market crash, while poorer nations would be hit by a likely 1989 slowdown.

Brazilian finance minister Mailson Da Nobrega said: "Industrial countries are growing while we are not. We are not on a way to a solution of the debt problem."

But, sounding a conciliatory note, he said the G-24 whose meeting he chaired sought answers "in a cooperative spirit rather than a confrontational one."

The G-24 said higher interest rates, used by the United States, Britain and others to pinch off inflation, simply added to the burden of debt repayment.

Inflation recently replaced the possibility of a post-Crash slump as financial markets' No. 1 anxiety.

The Group of Seven said inflationary pressures were being contained but there was a need to stay vigilant.

The G-7 communique also said the leading non-communist industrial nations "reaffirmed their commitment to pursue policies that will maintain exchange rate stability and to continue to operate closely on exchange markets."

The Toronto debt guidelines gave creditor governments a range of options to choose from in granting debt relief - from straight write-offs through concessional interest rates to extended repayment terms.

But according to calculations made then, the deal affects only about $15 billion of well over $100 billion owed by the poorest nations.