A soldier mired in the throes of inebriation could potentially face criminal charges after chugging along a stretch of train tracks in Germany that he used as his personal GPS to navigate his way back to base.

Witnesses contacted police after seeing the Hohenfels-based 20-year-old letting off some steam during the railway stroll near the Bavarian town of Nürnberg, Stars and Stripes reported.

The vagabond soldier, whose name is currently being withheld, was reportedly “heading home after enjoying large quantities of alcohol and, in a manner reminiscent of the Wild West, was walking along the train tracks to find his way,” according to a statement by Josef Pongratz, a federal police spokesman based in Waldmünchen.

Do Germans think the Wild West was just a bunch of guys walking around on tracks, holding up the development of the Transcontinental Railroad?

Josef might be mixing up River Phoenix and the “Stand By Me” gang with Wyatt Earp, Jesse James and Wild Bill Hickok, but whatever the interpretation, multiple trains, including a high-speed ICE variety — not that ICE — were forced to stop or slow their routes in order to avoid hitting the drunken locomotive enthusiast.

“The driver of the ICE train applied the emergency brake and then proceeded very slowly,” said Pongratz.

Despite the presence of the slow-rolling train to his rear, the oblivious soldier — a human embodiment of hell on wheels — continued walking right along, perhaps even humming his own personal rendition of that ol’ popular railroad tune.

I’ve been walkin’ down the railroad, all the live long day. I’ve been walkin’ down the railroad, I’m too drunk to feel my face.

With the fatigue of falling victim to ICE train tailgating setting in, the soldier finally acquiesced to the high-speed German train’s right of way and stepped off the tracks — just like in the Wild West.

The derailed 20-year-old was subsequently apprehended by German authorities and handed over to Hohenfels MPs.

The Prodigal Son is returned.

What punishment the soldier will face remains to be seen, but German law cites a charge of “endangering train traffic” as an offense that can result in anything from a six-month to a 10-year sentence.

“What the soldier did was extremely dangerous,” Pongratz said. “ICE trains travel very fast and need a long time to come to a stop.”

“It doesn’t bear thinking about what could have happened if the woman who saw the soldier had not immediately called the police,” he added. “Incidents like this don’t always end well.”