The agreement was announced Thursday after a 6-month standoff.