JIMMY CARTER tried to accommodate the Nicaraguan revolution, and the Sandinistas moved left -- toward tighter internal control, sponsorship of a guerrilla "final offensive" in El Salvador, closer links with fellow Marxists in Cuba and the Soviet Union, and greater tension with the United States. Ronald Reagan ceased accommodating and applied pressure -- and the Sandinistas moved farther left. The record does not justify confidence that anything the United States does will soften the Sandinistas' determination to consolidate power. Yet serious people in the hemisphere continue to try.

We say this by way of addressing the economic sanctions that President Reagan imposed last week. There was broad agreement -- from liberals more in anger and conservatives more in sorrow -- that ending direct trade and cutting air and sea links amount to too little too late. Quickly the conventional wisdom became that if these measures make any mark at all, they will add to the people's misery, hurt good guys in the private sector and drive the Sandinistas into the Kremlin's arms.

Had Daniel Ortega not variously provoked and embarrassed Congress by visiting Moscow right after Congress said no to the contras, the reaction doubtless would have been even sharper. All this despite the fact that some of those who bad- mouthed sanctions had opposed military intervention a week earlier on grounds that lesser remedies, such as trade restrictions, should be tested first.

In fact, what the objections amount to is what all of us should know by now. The Sandinistas are a resourceful crew. In the prevailing circumstances, it is not easy for Americans or anyone else to get at them. A soft policy has been tried, and a hard policy, and assorted blends, and noth worked.

Still there remains reason for applying pressures that, while of uncertain effect, at least express the distrust and wariness that Americans of different persuasions feel toward the Sandinistas. It is not ignoble or intrusive or bullying for the United States to take a neighbor's interest in wanting to see the countries in this hemisphere move toward democracy and respect for their neighbors. It is legitimate, necessary and right. The Sandinistas in coming to power sought and received the hemisphere's support by promising democracy and respect for their neighbors. This is the case for sanctions.

That said, we must add that President Reagan has gone about imposing them in a slapdash way. They could have been introduced as part of a careful strategy worked out with Congress and with the Latin Contadora democracies and the Europeans. One version of such a strategy has been suggested by Sens. Nunn, Johnston, Bentsen and Boren. Instead, Washington is acting alone, without commitments from either Latins or Europeans and -- worse -- without a clear and agreed statement of what the sanctions are meant to achieve.

American policy should be trying to induce the Sandinistas to trim the activities and connections that trouble Nicaragua's neighbors and to move toward a political opening. But if, as seems evident, the administration is still striving to remove the Sandinistas, then the new sanctions are going to be widely taken not as a turn toward a more sensible and sustainable Nicaragua policy but as a feint in a presidential battle with Congress over relaunching the contras.

Then there is South Africa. Intellectually, it is not hard to grasp the proposition that sanctions make sense in some circumstances and not in others. Yes, we would say, in Nicaragua, where such a lever -- properly applied -- could help mobilize the pressures supported by many anxious people in the hemisphere. No in South Africa, where sanctions might actually undercut the internal forces already pressing strongly for change.

As a practical matter, however, the president may already have forfeited the chance to have either case considered on its merits. On the Nicaraguan sanctions, which he imposed, he acted alone and in haste when at least a brief pause and some consultation were plainly in order. On South African sanctions, which he opposes, the political tide was probably already going against him and has been given new impetus now. In both places, his policy is in trouble.