BANDAR SERI BEGAWAN, Brunei (AP) ¿ Brunei and Malaysia sealed a pact Monday to settle a maritime territorial dispute that has blocked the exploration of rich offshore oil reserves off Borneo island for six years.

Brunei's Sultan Hassanal Bolkiah and Malaysian Prime Minister Abdullah Ahmad Badawi signed the agreement at a ceremony in Hassanal's palace to resolve the spat that has been an irritant to the neighbors' warm ties.

Both Malaysia and Brunei awarded exploration contracts to parts of an undersea site with potentially large oil reserves several years ago. But exploration activities have since stalled because the countries discovered that some of the areas overlap.

Malaysia's national oil-and-gas company Petronas awarded two offshore sites to U.S.-based Murphy Oil Corp. in 2003. But Brunei awarded nearly identical blocks around a year earlier to consortiums led by Royal Dutch Shell and France's Total SA.

Both sides are expected to cooperate on the exploration and exploitation of the sites, Foreign Minister Rais Yatim indicated last week, though it is not immediately clear when those activities could resume.

Total froze offshore work at Brunei's exploration block in 2003 after a Malaysian navy boat chased a Total vessel away from the area.

The sites were keenly contested partly because both countries have had limited success in finding oil even as output declines from their mainstay fields. Brunei especially relies heavily on oil and gas export revenue to prop its economy.

Oil and natural gas-rich zones lie off the coasts of Brunei and Malaysia's states of Sabah and Sarawak on Borneo island.

Abdullah said Brunei also agreed in the agreement to drop a long-standing claim to Limbang, a timber-rich area in Sarawak, Malaysia's national news agency Bernama reported.

"This means that Limbang is part of Malaysia," Abdullah was quoted as telling Malaysian media. "With the issue solved, Brunei and Malaysia can now enter a new era of bilateral relations and cooperation in various fields and there is no more unhappiness over the issue."

Copyright 2009 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.