The agreement, which settled territorial disputes related to nearly 500km of the border, also included mutual access to water and energy.