BANDAR SERI BEGAWAN, Brunei (AFP)--The leaders of Brunei and Malaysia on Monday moved toward settling a border dispute that could clear the way for exploration in potentially oil- and gas-rich waters, aides said.

Brunei's information ministry said Sultan Hassanal Bolkiah and visiting Malaysian Prime Minister Abdullah Ahmad Badawi signed the agreement at the Brunei ruler's palace in the capital, Bandar Seri Begawan.

Malaysian Foreign Minister Rais Yatim was quoted by Malaysia's official Bernama news agency as saying that the accord contains principles of cooperation to be implemented in the surveying and demarcation of the land and maritime borders.

It also calls for the setting up of technical committees to finalize the details on the boundary issues.

Brunei and Malaysia have been in a dispute over a potentially oil- and gas-rich area off the Borneo coast for the past six years.

Brunei, a tiny monarchy surrounded by Malaysia's eastern states of Sarawak and Sabah, awarded exploration rights in one offshore block to French oil compan Total SA (TOT) and another block to Royal Dutch Shell Group (RDSA)in 2002.

But the deep-water blocks are also claimed by Malaysia, whose state-owned oil firm Petronas awarded identical acreage to U.S. Murphy Oil Corp. (MUR) and its own subsidiary, Petronas Carigali.

Brunei, a Malay Muslim kingdom, is Southeast Asia's fourth-largest oil producer and the world's ninth-largest exporter of liquefied natural gas, according to a World Trade Organization report.