The pact is nearing the finishing line after 18 years. The talks started in 2007.