France and West Germany agreed today to adjust the values of their currencies, averting a major crisis and ending a bitter dispute that threatened to derail the European Community's joint monetary system.

The emergency agreement to realign European currency values came only hours before Western European leaders convened here for a two-day summit meeting, which began in an atmosphere of profound relief that the weekend's acrimony had ended.

In the Paris-Bonn accord, the mark was revalued upward 5.5 percent and France agreed to devalue the franc 2.5 percent. The Dutch guilder, Danish krone and Belgian franc were tugged upward along with the mark in the currency adjustment, while the Irish pound and Italian lira were permitted to join the French franc in a downward shift.

The dollar climbed today, closing at 7.255 francs in Paris.

While officials sought to minimize the impact of the controversy over currencies, the long weekend of haggling appeared to leave a residue of rancor and distrust between the governments of West German Chancellor Helmut Kohl and French President Francois Mitterrand.

Chairing the summit only two weeks after his election victory, Kohl said he accepted the compromise as "an expression of good will" toward his European partners. In return, France joined other community delegations in praising the "substantial German contribution" toward the 11th-hour accord.

"French-German friendship is a vital factor in our history and has never wavered over 25 years," said France's Finance Minister Jacques Delors, who two days ago accused Bonn of arrogance and lack of understanding. "We owe it to ourselves to speak frankly with each other," he added.

The West German spokesman, Jurgen Sudhoff, said that "after thunderstorms of the weekend, the summit began in a relaxed and pleasant atmosphere."

The lingering tensions were evident, however, in a discussion about the dangers of protectionism that took place after Mitter- rand excused himself to confer with Delors about a possible Cabinet reshuffle.

In the French president's absence, Kohl led a strong denunciation of protectionism that West German officials ironically noted was "supported unanimously by everyone present in the room."

France has urged the European Community to take a tougher stance against the United States and Japan on trade disputes, but West Germany has countered with the argument that free trade principles must be upheld to sustain a lasting recovery from the world recession.

The 10 heads of government agreed that a concerted economic recovery should serve as the prime topic at the global economic summit to be held in late May in Williamsburg, Va.

They also indicated that they would push the Reagan administration to focus on the broader objectives of the world economy and avoid such troublesome areas as the nature of trade with the East Bloc. A serious rift arose between Europe and the United States last year after President Reagan imposed sanctions on firms involved in building the Siberian gas pipeline between the Soviet Union and West Europe.

The European summit also was scheduled to delve into such issues as youth unemployment, environmental problems such as acid rain and the prospects of incorporating Spain and Portugal into the European Community during the next few years.

The aftermath of the currency battle clearly seemed to affect the mood of the summit and aroused apprehensions about the future relationship between Socialists in Paris and conservatives in Bonn.

French diplomats indicated that Mitterrand's support for Kohl during the recent election campaign and their common views on the need to strengthen the western defense alliance with modern nuclear missiles should have been reciprocated by cooperation on economic issues from Bonn as a quid pro quo.

For their part, West German officials were angry over France's brinkmanship--threatening to pull out of the four-year-old European monetary system if it did not get its way on currency realignment.

The West Germans said that since exports account for nearly one-third of their country's gross national product, they could not be expected to bear the brunt of a major revaluation--which means their products will cost more--when a record 2.5 million are unemployed.

But Bonn acceded to French wishes for a sizable increase in the mark's value when it became clear to the West Germans that rejection of Delors' position would strengthen voices in Paris urging new measures to curtail drastically the flood of imports.

As France's major trading partner, West Germany was bound to suffer even more from protectionist moves than from the upgraded value of the mark, which has the effect of making German exports relatively more expensive.

The West Germans decided that bowing to the views of the French moderates, personified by Delors, would serve the longer term interests of the West German economy and the crucial importance of relatively open foreign markets for its exports.

Bonn officials, however, emphasized that they would closely monitor French economic policy and broadly hinted that West Germany's ruling center-right alliance would not prove so magnanimous in the future if spendthrift policies lead to further erosion of the franc.

"The French must make clear to themselves whether they want to restore economic and financial health and liberalize foreign economic ties, or else snatch quick profits in the next few months before another crisis erupts," said Hans Joerg Haefele, a state secretary in Bonn's Finance Ministry, during a radio interview.

West Germany's finance minister, Gerhard Stoltenberg, finally consented to a 5.5 percent revaluation of the mark only after receiving assurances from his French counterpart, Delors, that Paris would adopt stringent measures to reduce inflation and slash its external trade deficit.

"Inflation is the congenital weakness of the French economy," Delors said. "We can't simply let it run wild."

Delors said he hopes to trim inflation to 8 percent for 1983 and reduce by half France's record trade deficit of $13 billion. To protect the franc against further speculation, France may draw on the community's $6 billion emergency fund.

But Delors warned that France could not afford to impose even greater doses of austerity because of prohibitive risks of higher unemployment. Recovery toward a sound and stable franc would be gradual, Delors said, because "we can't be expected to dance faster than the music."

Stoltenberg praised the "spirit of solidarity and responsibility shown by all partners" in reaching the accord and added that "a failure . . . would have had very serious consequences for European cooperation and an immediate negative impact on the community."

He said he hoped the new currency rates would last a long time, but in a pointed reference to policy makers in Paris, stressed that the success of today's agreement would depend on the effectiveness of new economic measures "undertaken by certain governments."