In a contest reflecting deep ideological and regional differences, Argentine ex-ambassador Alejandro Orfila was reelected secretary general of the Organization of American States today in an 18 to 7 vote.

With the member state voting by secret ballot, Orfila defeated Dominican Republic Foreign Minister Ramon E. Jimenez.

Orfila is considered widely to have exhibited considerable diplomatic skills as a spokesman for Latin American interests in Washington, where the OAS is headquartered. But in the contest for a second five-year term, Orfila utilized his talent for politics.

Jiminez had tried to convert the election into a vote of democracy in the Western Hemisphere, arguing that those countries that have elected civilian governments should vote against Orfila, whose native country has one of Latin America's most repressive military governments.

After his defeat, Jimenez bitterly told the OAS General Assembly of foreign ministers that the hemisphere's "democracies, and especially the authentic and consistent democracy of the Dominican Republic, now know who our friends are and which of them practice what they preach" -- a pointed reference to the United States, Mexico and seven Caribbean democracies that voted against him.

Orfila, 54, was able to defuse the ideological issue put forward by Jimenez, who one diplomat here described as "a nice guy but not much of an administrator," by restating his support for "pluralism," a belief that all sorts of governments must be accommodated within the OAS.

Of equal importance, Orfila fashioned an alliance with the increasingly numerous Caribbean members of the OAS, which might otherwise have voted for Jimenez and tipped the election in his favor.

Resentment has been growing on the part of Spanish-speaking Latin countries that have seen their dominance, at least in terms of votes, challenged increasingly as more British Caribbean colonies gain independence and join the OAS. The Dominican Republic, thought Caribbean, is Spanish-speaking.

In return for the Caribbean votes, Orfila and the Argentine Foreign Ministry actively supported the candidacy of Valerie T. McComie of Barbados for the assistant secretary post. Today became the first black, English speaking representative of a Caribbean nation to be elected to one of the two top OAS positions.

McComie won 14 to 13 over the incumbent Jorge Luis Zelaya Coronado of Guatemala. Afterwards, a high U.S. official here announced that the United States had voted for both Orfila and McComie.

"Our vote was based on an evaluation of the abilities of the individuals involved," the official said.

The election of McComie, this official said, marks a recognition of the increasingly important and unified role the small Caribbean nations are playing within and outside the OAS. He said the United States believes the role should be encouraged.

More important, according to diplomats here, is the future of the OAS. Depsite its more than 1,300 employes and yearly budget of $80 million, the OAS rarely plays a decisive role in resolving the serious differences that exist among the 27 member states.

At a press conference after his victory, Orfila said that a number of speeches at the Assembly, including one Tuesday by U.S. Secretary of State Cyrus Vance, indicated that the members are beginning to view the OAS as a potentially more important forum for the discussion and resolution of substantive issues.

Orfila said he hopes these words are translated into action. But he added: every secretary general has said at one time or another that "it is up to the member states themselves, not the general secretary, to make the OAS whatever they want it to be."