* ICJ awards Peru over half of disputed ocean territory
* Chile retains rights to valuable fishing grounds near shore
* Stronger bilateral relations seen as leaders commit to abide by verdict (Recasts headline, adds response from leaders; changes dateline, previous LIMA)
By Thomas Escritt and Rosalba O'Brien
THE HAGUE/SANTIAGO, Jan 27 (Reuters) - The maritime border between Chile and Peru was reset by an international court on Monday, in a compromise decision that politicians hope will end one of Latin America's last remaining border disputes.
The Hague-based International Court of Justice awarded more than half of a disputed 38,000-square-kilometer patch of ocean to Peru, but Chile retained the bulk of the valuable coastal fishing grounds within that area.
Both countries have pledged to abide by the ruling, which should in the long term improve ties between the two fast-growing economies, whose bilateral trade totaled $3 billion last year and is rising fast.
Settling a dispute that had its roots in the 1880s' War of the Pacific, presiding judge Peter Tomka said the court would leave it to the two countries to mark their maritime borders precisely.
"The court expects that the parties will determine these coordinates ... in the spirit of good neighbourliness," he said.
The maritime border between the neighboring countries will be set by a straight line extending 80 nautical miles west from the point where their land borders meet and then heading southwest.
While Chile will have to cede territory in the deeper Pacific Ocean, it retains the most valuable fishing grounds.
The entire disputed area was estimated to be worth around $200 million a year in marine resources, but over half of that is an anchovy fishing area within 10 miles of shore.
A fishing industry source in Peru said the anchovy fishing would be unchanged by the verdict, although Peruvian fisherman would now be able to fish some deeper water species worth up to $40 million annually.
Of broader interest are the growing investments and trade between two of South America's most dynamic economies. Hopes are high that the dispute can be put to rest and the bilateral relationship put on a firmer footing.
"Both countries claim to be respectful of the court's decision so I think that is a very important result, in the broader sense, for Latin American relations and bilateral relations," said Carlos Portales, director for the Program on International Organizations, Law and Diplomacy at American University's Washington College of Law.
Speaking in a television address after the verdict, outgoing Chilean President Sebastian Piñera lamented the country's loss of ocean territory, but confirmed that Chile would abide by the judgment and that he would coordinate its implementation with President-elect Michelle Bachelet, who takes office in March.
In a simultaneous transmission, Peruvian President Ollanta Humala told a cheering crowd on the steps of Lima's presidential palace that the ruling was "transcendental" for the Andean country.
"I trust in the will of the Chilean government to carry out this verdict as soon as possible, and that this will open up a new stage in bilateral relations," said Humala.
NO WINNERS OR LOSERS
The decision was keenly followed in both countries, with a live broadcast of the verdict watched by fisherman in towns near the border and a crowd in Lima's city center.
Most people seemed relieved at the outcome.
"There are no winners or losers here. We are happy now to have maritime limits," said Jorge Morales from Lima's Plaza de Armas.
In a mainly Peruvian neighborhood in Santiago, there was some tension as arguments broke out and Peruvian stores were shuttered.
Rosana Bahamonde, a Peruvian who works as a housekeeper in Santiago, said she had been trying to disguise her accent in recent weeks and was afraid of repercussions.
"I think the decision should have been balanced because we are all brothers," she said, arm in arm with her Chilean partner. "The verdict doesn't have anything to do with us ... it doesn't concern us at all." (Additional reporting by Mitra Taj, Marco Aquino, Teresa Cespedes, Lucas Iberico Lozada and Patricia Velez in Lima and Anthony Esposito and Alexandra Ulmer in Santiago; editing by Larry King, G Crosse)