Irish authorities were able to resolve an inmate hostage hours-long standoff at a prison with a chocolate candy bar.

The ordeal at the Midlands Prison in Portlaoise on Saturday began with one inmate being taken hostage by two other inmates who barricaded themselves in a cell. One of the inmates was armed with a weapon, the Irish Post reported.

OHIO INMATE FALLS THROUGH CEILING, LANDS IN TRASH DURING FAILED JAILBREAK CAUGHT ON VIDEO

It ended five hours later when one of the hostage-takers who had the weapon agreed to give it up for a Mars bar, the newspaper reported.

“Staff responses and the incident was successfully resolved,” an Irish Prison Service spokesman told the paper. “No staff were injured, prisoners involved received only minor injuries.”

CLICK HERE FOR THE FOX NEWS APP

The incident was under investigation.