The Organization of American States has urged Nicaragua and Costa Rica to withdraw their security forces from a disputed river border, where there has been tension for a month.
In a resolution, the OAS said the two countries should begin urgent talks to resolve their differences reports the BBC.
Costa Rica accuses Nicaragua of deploying troops inside its territory on an island in the San Juan river.
Nicaragua insists the island is on its side of the border.
Costa Rica welcomed the OAS resolution as a "diplomatic victory" after 22 countries voted in favour, with only Nicaragua and its ally Venezuela voting against.
But Nicaragua says the organisation does not have the authority to rule on border disputes, and says it will not withdraw its troops.
The San Juan river marks the border between the two countries but an island at its mouth, Isla Calero, has been disputed for more than a century.
Nicaraguan troops set up a camp there last month in support of a dredging operation.
Costa Rica, which has no army, responded by sending armed police to the region.
Costa Rican President Laura Chinchilla has accused Nicaragua of "invading" her country.
Thousands of Costa Ricans marched in the capital San Jose on Saturday in support of a peaceful solution.