The agreement, involving the European Union and five South American countries, has been more than two decades in the making.