The agreement comes after years of lobbying and negotiations.