After a long day of negotiations, the final text.