Hopes were high last night that an end to the bitter postal dispute was on the cards after both union leaders and management confirmed that they had reached an agreement on pay, pensions and flexible working.

Hopes were high last night that an end to the bitter postal dispute was on the cards after both union leaders and management confirmed that they had reached an agreement on pay, pensions and flexible working.

Significantly, it was the Communication Workers' Union (CWU) that was talking up the importance of what is being considered as the first step towards the negotiated settlement of the dispute that has resulted in industrial action since the summer.

A joint statement, signed off by Adam Crozier, Royal Mail's chief executive, Billy Hayes, the general secretary of the CWU, and Dave Ward, the deputy general secretary, said there were "agreed terms covering all aspects of the dispute".

They will be considered by the union's executive on Monday and if agreed as is expected will mean 24-hour strikes planned for Wednesday and Thursday will be put off while union members are balloted over the offer. Planned strikes for Monday and Tuesday had earlier been banned in an injunction granted by a High Court judge.

Full details of the deal were not clear last night, but it is understood that it covers the flexible working sticking point that resulted in wildcat strikes both north and south of the border.

A brief two sentence joint statement confirming the breakthrough is said to have taken three-and-a-half hours to hone.

A CWU spokeswoman said last night: "The agreement covers all aspects of the negotiation, including modernisation.

"I would imagine it would go to a ballot of the membership where there will be a recommendation for acceptance or rejection based on what the executive decides. If the executive decides to accept this they would suspend all action."

The development came a few hours after a High Court judge last night outlawed strike action planned for next week by the postal workers' union. Royal Mail was granted an injunction banning the Communication Workers' Union from going ahead with national walkouts on Monday and Tuesday.

Mr Justice King upheld an argument by Royal Mail's lawyers that the union had failed adequately to comply with legal requirements to state accurately the number of employees likely to be affected by the action.

The CWU, which said the strike was legitimate, had announced rolling 24-hour strikes to start on Monday and end on Friday, designed to cause maximum disruption to mail services with minimal financial loss for its members.

The injunction, seen as a coup for Royal Mail, blocked action due to start at 6pm on Monday in mail sorting offices and airports and from 3am on Tuesday in delivery and collection centres.

It still left open plans for 24-hour stoppages in the latter part of the week. Royal Mail drivers are due to strike from noon on Wednesday, manual data entry centre staff are expected to take action from noon on Thursday and Heathrow world distribution centre workers will join them from 2pm the same day.

Meanwhile, wildcat strikes involving thousands of workers in mail operations north and south of the border continued to hamper normal working throughout yesterday. The unofficial protests began on Wednesday - the first day back after two 48-hour stoppages - sparked by imposition of changes to working hours and issues over how much workers would be paid in the wake of the stoppages.

Royal Mail said around 30 offices out of 1500 were affected. After up to 50 Livingston workers downed bags on Thursday after being told they would get one day's pay this week for their involvement in the two 48-hour strikes, postal staff in Edinburgh North West and Grangemouth walked out for the same reason yesterday.