EU-brokered agreement would end months-long standoff