The MTA might never have existed had it not been for one nightmare Wednesday in 1950.

On Thanksgiving eve, the commute home was well under way. Thousands of train riders were heading from Penn Station back to Long Island, anticipating the long holiday weekend.

Then came the screech of steel against steel — and the worst accident in LIRR history.

“It was a scene of utter horror,” a reporter wrote of the carnage he witnessed after a Babylon-bound train rear-ended a disabled locomotive, which had been headed for Hempstead, just east of Kew Gardens, Queens.

Nearly 80 riders were crushed to death.

The mammoth crash of the two trains, then part of the privately owned Pennsylvania Railroad system, is rarely talked about today.

No memorial marks the spot.

But at the time, the crash was so horrific that it sparked a series of government takeovers, eventually forging the giant public authority known as the Metropolitan Transportation Authority.

Today, as MTA travelers recover from their “Summer of Hell,” the agency is mocked as a figurative train wreck.

Its subways remain filthy, full of beggars and plagued by delays, while Penn Station repairs have caused canceled and diverted trains on the Long Island Rail Road, which the agency oversees.

And the MTA itself is mired in nearly $40 billion in debt.

But its founding idea was that a public agency could do a better job of moving commuters reliably and safely — even though, sadly, it was a notion that took an epic tragedy to begin bringing it about.

Susan Nelson says her father responded to the blood-soaked scene that night as a member of the NYPD’s first paramedic unit.

“My father distinctly remembered a gentleman sitting in a seat, holding a bouquet of flowers,” Nelson, 58, recently recalled to The Post, referring to her late dad, Andrew W. Eyell.

“He said when he went up to talk to [the man], he realized he’d been severed in half, his top from his bottom.

“He was just sitting there, holding a bouquet of flowers as if he was asleep.”

The outcry over the incident was near-instantaneous.

“People were furious,” said CUNY historian and librarian Derek Stadler, who has written about the horror and its aftermath. “How could something like this happen?”

It was the second massive fatal crash for the railroad that year.

On Feb. 17, 1950, 32 passengers perished when two LIRR trains collided head-on.

Another crash occurred on Aug. 5 that year when an LIRR train ran through an open switch near the Huntington station and smashed into a sidelined freight train. No one was killed, but 46 passengers were injured.

Then there was the Thanksgiving-eve horror.

Shortly afterward, the state Legislature created an oversight authority to monitor the bankrupt LIRR, nudging it toward systemwide modernizations.

But it wasn’t until 1965 that New York state purchased the railroad from its parent company, the Pennsylvania Railroad, and set up the MTA’s predecessor agency, the Metropolitan Commuter Transportation Authority.

The brainchild of Gov. Nelson Rockefeller, the authority within three years, in 1968, also took over operations of the New York City subway system, changing its name to the current one, the Metropolitan Transportation Authority.

From there, it would grow to be a public-transit behemoth, the biggest in the country, acquiring toll bridges, bus systems and still more commuter rail lines throughout the 1970s and 1980s.

But money was always an issue.

“Right after the MTA formed in 1968, that’s when the city hit its fiscal crisis” and funding for infrastructure for public services plummeted, recalled Chris Jones, chief planner for the Regional Plan Association.

“In the late 1970s, it was an everyday mini-crisis,” he said. “For many people who took the subways, there wasn’t a week that went by where there wasn’t a train taken out of service when you were on your way to work.”

Richard Ravitch, MTA head from 1979 to 1983, recalled, “There were daily derailments, fires and delays.”

Gene Russianoff of the Straphangers Campaign noted, “By 1981, ridership on the subways had dropped to the lowest point since 1917.”

“People were abandoning the system,” he said. “I remember being on the platform and smoke wafting through and continuing to read my newspaper because it was just such a normal occurrence.”

In 1981, the average subway car made it only 6,994 miles between breakdowns. By comparison, today, cars make it an average of 112,208, according to MTA data.

In 1983, the agency acquired its final property, taking over all of the Metro-North lines.

For the next decade, the MTA would be mostly in triage mode, trying to put out figurative and literal fires and keep its trains from breaking down.

Today, every weekday, the MTA moves 11 million train, subway and bus passengers and charges bridge tolls on 800,000 vehicles.

Still, for all its good intentions and real improvements, the agency remains plagued by delays, deficits and accidents.

It’s a faint but persistent echo of the bad old days of almost 70 years ago — and the crash that started it all.

It was a mechanical problem — typical to the LIRR and the nation’s other railroads, all straining under the pressure of decreased ridership during the rising reign of the automobile — that set the Thanksgiving-eve crash in motion.

Train 780 from Penn Station to Hempstead had just passed through Kew Gardens, its seats and aisles packed with 1,000 commuters.

The motorman saw a caution signal ahead. He pumped the air brakes. But the brakes jammed.

The rear brakeman was sent outside to stand behind the train with a red lantern, to warn any approaching trains.

But soon, he heard his train powering back up.

“He thought the braking problem was solved and the train was about to get under way,” according to a comprehensive 2010 account by the Kew Gardens Civic Association. “So he extinguished the lantern and reboarded the rear car.”

“That was a mistake,” it says.

The brakes on the Hempstead train were still jammed.

It was around 6:30 p.m., the height of rush hour, a time when eastbound commuter traffic was four times heavier than during off-peak hours.

“Probably seconds after the brakeman extinguished the warning lantern, a New York-to-Babylon train came around the bend about 4,600 feet back,” according to the account on KewGardensHistory.com.

The oncoming Babylon train’s motorman saw a “Go Slow” signal due to the congestion ahead and cut speed to about 15 mph.

But then he caught sight of a second signal a half-mile ahead showing “all clear.”

So he sped up.

“It never dawned on him that the ‘all clear’ signal was meant for the Hempstead train stalled in darkness only a third of a mile ahead,” according to the account.

The Babylon train was going around 35 mph when the motorman saw the Hempstead train’s tiny red “marker lights,” and by then, it was too late.

“In the last seconds of his life, the motorman of the Babylon train had tried to apply his emergency brakes,” the account says.

“He succeeded only in slowing the Babylon train to about 30 mph before impact.”

The brakeman from the stalled Hempstead train, meanwhile, had realized that his train wasn’t ready to get under way after all.

At the moment of collision, he had just stepped back off the train, a move that saved his life.

“The rear brakeman,” notes the account, “was injured but survived.”

One image from the carnage stood out to a United Press reporter: a head that jutted from a window of the train wreckage.

Wide-eyed, and streaked with blood, it would stare lifelessly at rescuers as they struggled to reach the faint cries of “help” from those imprisoned inside.

“That horror-stricken mask stared at clawing workmen for four hours,” recalled the reporter, John Marka.

“Doctors hung precariously from ladders, from windows of the train, and they perched upon bent girders holding plasma bottles whose little red tubes fed to within the mass of steel where the injured lay pinned.

“Sturdy arms would reach into the twisted steel and pull out the body,” Marka wrote.

“They carried out a man who smiled after they amputated his leg to free him,” Marka wrote. “[Then] they carried out just a leg.”

On impact, the front car of the oncoming train and the back car of the stalled train had fused into a single mass of twisted metal and trapped bodies.

A witness described seeing riders “packed like sardines, in their own blood.”

It would take all night, in freezing weather, for emergency workers — working by floodlight with acetylene-fueled cutting torches and wooden ladders — to free the survivors and pull the 78 dead men and women from the wreckage.

The MTA was officially formed nearly two decades later — but it had been in the making since that tragic night.

People wanted answers, and they wanted their government to step up and give them some, mainly in the form of safeguards and improvements.

It’s a push that still exists today, Stadler said.

“It’s still not perfect,” he said of the city’s transit system. “Far from it.”