The Organization of American States, responding to an urgent appeal by the United States, called last night for the "immediate and definitive replacement" of Nicaraguan President Anastasio Somoza's regime and set the stage for an OAS role in efforts to create a post-Somoza government.

The resolution, adopted 17 to 2 by OAS foreign ministers, bore little outward resemblance to the proposal presented to the hemispheric body on Tuesday by Secretary of State Cyrus R. Vance. Specifically, it eliminated Vance's suggestion that an inter-American peacekeeping force be sent to Nicaragua.

But, buried within the resolution's pledges of fealty to OAS principles of nonintervention was language that gave the Carter administration a clear victory on the three priority goals it had sought to achieve at the three-day meeting. These were:

- Denunciation of the "inhumane conduct" of the Somoza regime as "the fundamental cause" of the bloody civil war in Nicaragua and a call for immediate replacement of the regime.

- Support for creation of a democratic interim government that will contain broadly based moderate elements as well as the leftist guerrilla forces fighting Somoza.

- A call for OAS countries "to take steps to facilitate an enduring and peaceful solution of the Nicaraguan problem" - language that opens the door to member countries to act as mediators in the negotiations leading to creation of an interim government.

U.S. satisfaction with the outcome was expressed immediately after the vote by Deputy Secretary of State Warren M. Christopher, who took over as head of the U.S. delegation after Vance's departure yesterday for the Tokyo summit.

Christopher said the resolution was "without precedent" and called it "an extraordinary effort by the nations of the Western Hemisphere to deal with the unique and tragic problem of Nicaragua."

In private, U.S. sources said administration policymakers would begin at once to formulate strategy for translating the goals spelled out in the resolution into reality.

Underscoring the urgency that the administration attaches to the problem was President Carter's decision yesterday to have his national security affairs advisor, Zbiginiew Brzezinski, who had been scheduled to go to Tokyo, remain in Washington temporarily to work on the Nicaraguan situation.

Despite the dramatic and unprecedented U.S. call for the ouster of a leader with whom Washington long had close relations, Somoza thus far has given no sign that he is willing to step aside.

Similarly, the guerrillas of the Sandinista National Liberation Front who have been fighting Somoza have denounced the U.S. maneuvers as an attempt to cheat them of victory and have vowed to go on fighting.

On the first point, U.S. officials, noting that from most of Somoza's traditional supporters among Latin American military regimes deserted him in the vote, appeared to hope he would see this as "handwriting on the wall" and, after some display of bravado, go into exile.

On the second problem, U.S. strategy is geared toward persuading democratic Latin American governments sympathetic to the Sandinistas to step in as mediators and get the guerrillas to join with other anti-Somoza froces in Nicaragua in establishing a new government.

The principal candidates considered by Washington for this role include the Venezuelan-led Andean Pact countries and some nations in the Caribbean and Central America. The proposal offered by these countries as a counter to the U.S. recommendation formed the basis of the resolution the OAS adopted last night.

Their proposal was prompted by concern that the Vance proposal was overly interventionist. The language in their resolution condemned Somoza, but assetted the right of the Nicaraguan people to resolve their own problems and called for giving the Sandinistas the dominant role in a new government.

Faced with this opposition, the United States dropped its proposal for a peace force - an idea U.S. officials knew in advance had little chance for acceptance - and lobbied strongly to win more immediate objectives.

These involved amending the counterporposal to include provision for an OAS mediating presence and dropping language that was overly supportive of the Sandinistas.

The Latin American proposal, as originally offered, had called for formation of a government "#which will recognize the contribution that the various groups within the country have made in seeking to replace the Somoza regime...."

That was unacceptable to the United States, which mistrusts the Marxist, pro-Cuban positions of some Sandinista leaders and wants their influence in any government diluted by more moderate forces.

In the end, the U.S. argument that an effective resolution required a sizable majority of OAS members support, won agreement of most of the Latin countries to the changes.

When the vote came only Paraguay, governed by an entrenched military dictatorship, joined Nicaragua in voting against the resolution.

Five other hard-core military regimes that have supported Somoza - Gutemala, Honduras, El Salvador, Uruguay and Chile - abstained. Also abstaining was Trinidad, which traditionally does not vote on OAS questions pertaining to the affairs of other countries.

Voting for the resolution, in addition to the United States, were Jamaica, Haiti, Venezuela, Peru, Ecuador, Barbados, Grenada, Bolivia, Brazil, Panama, Columbia, Mexico, Surinam, Argentina, the Dominican Republic and Costa Rica. CAPTION: Picture, Opponents of Somoza wait to enter OAS headquarters to observe the meeting. AP