Paris — It was no accident that French troops in Beirut were hit almost as hard as American Marines. Under Socialist President Francois Mitterrand, France is more active and visible on the world stage, after the United States, than any other Western nation - and surprisingly, often to the delight of a conservative American administration.
French soldiers are in Chad as well as Lebanon, and they continue to protect former French colonies in West Africa. In the Gulf and in Europe, France is also playing an assertive role. It has plans to deliver five Super Etendard jets to Iraq and embraces NATO's projected missile deployment.
The echoes of Charles de Gaulle ring clear. But this display of power comes from a government that was elected only two years ago on an anti-interventionist , anticolonialist, antimilitarist platform.
That platform was misleading. Mr. Mitterrand always shared the general's view of France's quasi-messianic responsibilities in the world. When elected, Mr. Mitterrand said France would act as a benevolent ''third'' force, bridging the gap between rich and poor nations and helping them avoid the clutches of the East-West rivalry.
Mr. Mitterrand did stake out his distance from both Washington and Moscow. With the Kremlin, he was steadfast on defense matters. With the White House, he criticized trigger-happy support of right-wing autocrats.
Meanwhile, contacts with the third world were strengthened. France established what it describes as a ''special relationship'' with Algeria, India, and Mexico, largely by buying overpriced Algerian gas, supplying nuclear fuel to India, and joining Mexico in sponsoring a peace initiative for Central America. Aid to the third world is being doubled to .7 of 1 percent of GNP by 1988, even though France faces economic trouble at home.
Such socialist generosity aside, more often than not the realities of power have forced Mr. Mitterrand to substitute hardheaded pragmatism for progressive rhetoric. On the one hand, Mitterrand says he continues to despise anything suggesting neocolonialism. On the other, when Libya invaded Chad, Mitterrand's ''responsibilities'' to his former colony dictated the dispatch of troops.
Lebanon presents a similar scenario. The Socialists are uncomfortable losing men in a former protectorate's civil war. But, as Mitterrand said on his return this week from Beirut, France ''remains and will remain faithful to its history and to its commitments'' in Lebanon.
Hardheaded pragmatism has also meant trying to limit the costs of foreign engagements. French soldiers are not being sent overseas to impose solutions in civil wars. Not only does Mr. Mitterrand believe that such intervention would be wrong, but also he senses that it is beyond France's power.
French troops have not fired a single shot in Chad. The controversial delivery of Super Etendards to Iraq seems to have been delayed as the French search for a way to minimize the danger. And in Lebanon, where peace-keeping has required shooting back, the French have been noticeably nervous. They have gone out of their way to state that they will not fight the Lebanese Army's battles and have asked for the United Nations to replace its force.
Further afield, realities have forced France to lower its profile. For example, Mitterrand initially sought to be active in Central America, only to find he was infuriating the US. So he pulled back. Calls for negotiations in El Salvador and support for the Sandinistas in Nicaragua are now muted. When Sandinista leader Tomas Borge Martinez recently visited Paris, he received little aid and no arms.
The same logic holds for this week's invasion of Grenada. Mitterrand and his Socialists disapprove - but quietly. Intervention is justified only when a local government asks for help, French officials explain. Still, they want to avoid a spat with Washington in an area that is not vital to France and where Paris cannot hope to change Washington's thinking.
In spite of itself, therefore, socialist France is working in concert with conservative America. America pushed for the intervention in Chad, asked for the help in Lebanon, and is overjoyed by Mitterrand's loud support of European missile deployment.
Of course, France remains prickly and proud. On the Soviet gas pipeline, it led resistance to US attempts to stop the project. And after the South Korean jet tragedy, it refused to cut off flights between Paris and Moscow.
''They can be exasperating,'' an American diplomat admitted. ''But in general we're very appreciative of their actions. They are a good ally.''
Neither French nor American diplomats advertise this entente too loudly, however. The worst thing in France is to be branded as an American poodle. So far, Mitterrand has avoided this charge and succeeded in building a national consensus on his foreign policy.
Only his Communist partners have objected to intervention in Chad and Lebanon. Mitterrand simply ignores their complaints.
The rest of the political spectrum is generally supportive, with the conservative opposition finding little of substance to criticize. This acquiescence could end if the cost of intervention rises, but for now, even the antigovernment newspaper, Le Quotidien, has been reduced to praising ''Francois Mitterrand's firmness.''