Passengers on a train from Dublin to Westport in Co Mayo were stuck onboard for two hours when it broke down near Castlebar.

The train left Dublin at 1.40pm and broke down at 4.50pm.

Service resumed shortly before 7pm.

One passenger on board told RTÉ News that communication about what was happening was very poor.

Irish Rail spokesperson Jane Cregan said that while some announcements were made, the driver was outside of the cab attempting to rectify the problem for most of the time the train was stopped and this may have contributed to the small number of announcements made.

The 3.40pm train from Heuston to Westport also terminated at Claremorris and a bus to Westport was provided, Ms Cregan said.

Bus transfers also brought passengers who had intended on taking the 5.45pm train from Westport to Dublin to Claremorris, where the service commenced, Ms Cregan added.

Ms Cregan apologised on behalf of Irish Rail to all passengers caught up in the delay.

Meanwhile, Irish Rail has confirmed that the 5pm train from Dublin to Cork failed to stop at Mallow station due to driver error.

Ms Cregan said that the train continued into Cork station where the passengers were able to avail of the 7.25pm service back to Mallow.

Those who were travelling on to Killarney were accommodated on a train from Mallow, Ms Cregan added.