Prison staff in England and Wales have taken part in widespread protests over "unprecedented violence" in jails.
Staff complained about safety within prisons, saying they had been attacked by gangs of inmates, been spat at and had urine thrown at them while on duty.
The union said there were protests outside "a majority" of jails, which ended after six hours when the government agreed to talks on Monday.
Prisons Minister Rory Stewart said the action was illegal.
When it announced the suspension of the protest, the Prison Officers' Association said the prison service had withdrawn the threat of court action against the union.
General Secretary Steve Gillan said he was "confident a deal is a deal", adding that he hoped "for meaningful, constructive dialogue" next week.
The protests caused delays in courts because prisoners were unable to be transferred for hearings.
The action came after an inspection report on Thursday found inmates had effectively taken control at Bedford Prison.
Brian Cooper, branch chairman of the Prison Officers' Association, said conditions at the jail were unsafe "every day".
"This year so far we've had an officer who's had his head stamped on and needed emergency surgery for a bleed on the brain.
"We've had an officer have his arm broken with a pool cue when he was attacked by a prisoner.
"Another officer has a fractured eye socket with part of the bone detached and might lose the ability to move his eye properly, permanently."
Bucket of urine
A female prison officer who was demonstrating outside Bedford Prison said she had a bucket of urine thrown over her from an above landing.
"They're not bothered if you're female or male; they have no respect regardless if you're female," she told BBC Radio 5 live.
"We have some issues of being hit. I've been spat at several times. The other week I was spat at twice within five minutes in the face."
On that occasion she said she had to be tested for hepatitis B.
Julia Killick, who was a prison governor for 18 years, said the walkout would have made it "horrendous" for prisoners, as well as the remaining staff who would only have been able to do the "absolute minimum".
She told Radio 4's World at One that tasks such as serving food would have been difficult to carry out, while prisoners could get "very angry or distressed" having to stay locked up.
By Danny Shaw, BBC home affairs correspondent
Prison staff are banned from taking industrial action, so holding "protest" meetings in car parks or outside the gates on the grounds that health and safety is being compromised is the union's way of trying to circumvent the rules.
The POA did it before, most recently in November 2016 when 10,000 officers stopped work, before the High Court ordered them to return.
This time, the threat of legal action - together with a government pledge to address staff concerns - was enough to bring the walkout to an end.
Nevertheless, it has highlighted the very real problems POA members are facing.
There is particular frustration officers haven't been equipped with PAVA incapacitant spray - similar to pepper spray - to deter and respond to attacks.
A trial has been taking place in four jails but union officials believe the government is stalling on rolling the equipment out to other prisons.
Before an agreement with the union was reached, the Ministry of Justice said "contingency plans" were in place and it was seeking an injunction to stop the protests.
Labour said the action was a "wake-up call" for the government, adding that extra funding to end understaffing and overcrowding was "desperately needed".
Images posted on social media showed walkouts at many prisons.
The POA said members were instructed to ensure there were enough staff on duty inside prisons to deliver medication to prisoners and deal with any disorder.
It accused the government of overseeing "the demise of the prison service over the last eight years".
Mr Gillan said ministers had been "paying lip service" to the safety and human rights of prison staff.
"We will now be demanding that the government provide safe prisons, meet our demands to improve personal protective equipment, reduce levels of violence and overcrowding," he added.
The union said the decision to call for a protest followed a letter from the chief inspector of prisons, issuing an urgent notification notice at Bedford Prison, published on Thursday.
Inspectors said they found Bedford prisoners regularly ignored rules, that there was a smell of drugs "pervading" some wings and an infestation of rats.
Peter Clarke, the chief inspector of prisons, sent a letter to the Ministry of Justice, which means the government has to publish a response and plan of action for the jail within 28 days.
It is the fourth jail to be subject to the "urgent notification" process after Nottingham, Exeter and Birmingham.