No one was hurt as the locomotive rolled through rural neighborhoods, with officers racing from railroad crossing to railroad crossing to block traffic.
Eventually, Cpl. Duane Prescott managed to jump aboard the 400,000-pound Union Pacific locomotive, then pushed and pulled every control he could find.
"One of the handles said reverse so I grabbed it and shoved it into reverse and the train kind of slowed and started going the other way," Prescott said. "So I tried pushing it the other way to get it to jam up."
The engine started to back up, and railroad employees stopped it by placing ties across the tracks.
Police said the locomotive was reported loose and rolling downhill at about 40 mph in west Boise. Near Nampa, about 25 miles west of Boise, Prescott tried twice to jump aboard, making it the second time after the locomotive had slowed considerably.
The locomotive was halted in time to prevent it from crashing into another engine sitting on the tracks farther ahead.
Police are investigating how the engine broke loose.
After the ordeal, the corporal reluctantly sat down with reporters who wondered why he tried such a crazy stunt.
"My thought was that if this thing keeps going somebody's going to get a car in front of this train," he said.
But jumping a moving train isn't something officers learn at the police academy.
"Unorthodox. Brave. It was nevertheless courageous to say the least. I have nothing but praise for his actions," said Sgt. J.R. Jensen.
Now, everyone's calling Corporal Prescott a hero except Corporal Prescott.
"I was just the one who was lucky enough to be in the position to do it," said. "But I believe that every one of the other officers if they would have been in the same position would have done exactly what I did."
All in day's work for the humble lawman who rode off before anyone could even say thanks.