The terrifying drama began when PC Gagin of the Leicestershire Constabulary was called to investigate a suicide note left by a man at the offices of an Internet service provider.
The threat had been made over a phone bill dispute with BT.
PC Gagin searched the area and found the man perched on top of a 30ft-high signal gantry over the mainline track five miles from Leicester Railway Station.
PC Thomson, of the British Transport Police, was also called to the scene and together they climbed to the top of the gantry walkway.
As PC Thomson reasoned with the suicidal man to come down, he moved further away until he was sitting on a piece of metal, just four inches wide.
Suddenly, the man's eyes rolled back. He was having a seizure.
Fearing that he would plummet to the railway track below, PC Thomson climbed over the gantry and grabbed the man's arm.
But the man regained consciousness and wriggled away.
Gritting his teeth, PC Thomson clutched the man's trouser belt and tried to haul him back.
Even when the man undid his belt, PC Thomson refused to let go and grasped his arm.
As the man's 16-stone frame threatened to pull PC Thomson over the side, PC Gagin clung to his colleague's belt.
With its flimsy plastic clasp, it wasn't strong enough to withstand the strain, so PC Gagin grabbed his police vest.
For 20 minutes, the two policemen held on for dear life, thinking only of the man they were trying to rescue.
Finally, he gave in and allowed the brave PCs to pull him to safety.
Says PC Thomson, 43: "In my 22-year career, it was one of the most frightening incidents I've dealt with. I didn't think of the danger until later."
PC Gagin, 34, adds: "I must admit, I was afraid that if he jumped we'd all go down with him."