Washington (CNN) -- The permanent council of the Organization of American States has approved a resolution asking troops to withdraw from the disputed border area between Costa Rica and Nicaragua.
In a resolution issued early Saturday, the council said both nations should "avoid deployments of the armed forces or security forces in the area where their presence could generate tensions."
Tensions between Nicaragua and Costa Rica have flared over Calero Island, a parcel of land on the Atlantic coast. Managua claims the area is Nicaraguan and denies its troops are in Costa Rican territory. Costa Rica claims it has been invaded.
The resolution supported a report by OAS Secretary-General Jose Miguel Insulza that said both sides should resume binational talks and not escalate the military and police presence near the disputed area.
The council's Washington meeting was contentious, however, beginning Friday afternoon and lasting until early Saturday as diplomats tried to reach consensus. Ultimately, the resolution passed with 22 votes, the organization said in a statement. Three countries abstained and two voted against it.
Denis Ronaldo Moncada, Nicaragua's ambassador to the Organization of American States, said early Saturday that officials from his country would challenge the resolution.
"In the end, an agreement was reached that is really without any value," he said.
"We are going to challenge this resolution. We are going to question it, and we are going to document our position against this resolution, which was flawed from the outset and flawed in its conclusion," he said.
Costa Rican officials claimed the vote was a "triumph of peace and law."
"Now, more than ever, the Nicaraguan authorities must know to listen to the clamor of all of the hemisphere in favor of peace and peaceful relations between neighboring nations, and withdraw their armed forces from Costa Rican territory," Costa Rica's foreign ministry said in a statement.
Costa Rica claims that in addition to the Nicaraguan troops, a dredging project in the river is dumping sediment on its side of the border, and that a Costa Rican flag in the area was replaced with a Nicaraguan flag.
Nicaragua has accused Costa Rica of breaking diplomatic relations between the countries.
Wednesday, Costa Rican President Laura Chinchilla said her country would take its border dispute with Nicaragua to the
United Nations and the International Court of Justice if a resolution is not found.
Chinchilla has said her country accepted the recommendations made by Insulza, but that before there are binational talks, the Nicaraguan troops must move back into undisputed Nicaraguan territory.
If the Nicaraguan troops pull back from the disputed area, Chinchilla said she gives assurances that Costa Rican police will not move in.
In response, Nicaraguan Vice President Jaime Morales Carazo acknowledged that Costa Rica may have no standing army, but said that means little, given that members of the Costa Rican police are better armed than Nicaragua's soldiers.
In an earlier interview with CNN en Espanol, he called on Costa Rica and Nicaragua "to resolve this as brothers" and "for a ceasefire in the verbal war," but added that Nicaragua is not the aggressor.
"We cannot invade our own floor of our own house," he said. "Neither can we accept from anyone conditions or ultimatums."
CNN en Espanol's Ione Molinares contributed to this report.