An allegedly drunk Queens man breached MTA security at a Bronx railyard, crashing his luxury sports utility vehicle onto subway tracks next to the electrified third rail, THE CITY has learned.

Stanley Hayden, 42, told police he was “just following his GPS” shortly before 2:30 a.m. Tuesday when officials said he slipped his white BMW SUV past a security checkpoint at the 239th Street Yard as another vehicle exited.

Hayden’s wild ride came to a screeching halt on top of a third rail powered by 625 volts of electricity.

According to the internal incident report obtained by THE CITY, a dispatcher called the MTA’s Rail Control Center at 2:20 a.m. after the driver crashed into a track at the railyard, which is home to the No. 2 train.

“This individual is now standing in front of a train on 4A track,” the report notes, adding that the driver was held in a dispatcher’s office until police arrived.

The breach outraged New York City Transit Riders Council head Andrew Albert, who also serves on the MTA board.

“Perhaps yards ought to have things like Jersey barriers to prevent this sort of thing,” he said. “You definitely do not want a car driving into a railyard.”

Abert added, “It’s dangerous to the driver, to the employees, to the railyard itself.”

Hayden “smelled of alcohol,” according to a police report. He is charged with reckless endangerment, reckless driving and driving while ability impaired.

‘It’s Unbelievable’

An MTA spokesperson told THE CITY the crash did not impact service or cause any delays. But it did force power to be shut down for more than 10 hours along the tracks closest where the BMW made its last stop after hurtling close to 500 feet.

The SUV’s presence also prevented three “refuse trains” from using the tracks to offload garbage collected throughout the subway system.

Some Bronx residents who live near the sprawling railyard were stunned that a car could slip past the Furman Avenue security checkpoint.

“I can’t believe my ears!” said Lorna Smith, 67, who whipped out her phone to call her landlord after learning of the crash.

“I can’t imagine why they would even be driving on that road,” said Charles Vasser, 64, who volunteers at a community garden next to the 239th Street Yard. “Because it’s clearly marked.”

A sign outside the yard says “No Vehicle Access from March 11 to March 26, 2013.”

“It’s unbelievable that someone could get into a yard like that,” Albert said. “We can’t have people doing that.”

Messages left for Hayden were not returned.

Sign up for “THE CITY Scoop,” our daily newsletter where we send you stories like this first thing in the morning.

Want to republish this story? See our republication guidelines.