OTTAWA -- Unifor said it has reached a late night deal with Canadian National Railway to avoid a lockout of 4,800 workers.

The union says ratification meetings will be held across the country over the next three weeks.

Details of the agreement will only be disclosed following ratification.

Canadian Labour Minister Kellie Leitch released a statement late Monday night saying she is pleased the railway and Unifor were able to renew their collective agreements.

The deal came after eleventh-hour contract talks over the past two days, avoiding a planned lockout.

With files from CTV Montreal