Some 150,000 New Jersey Transit commuters narrowly escaped a nightmare scenario when the rail agency came to an agreement last weekend with its unions, avoiding a strike that would have shut down the commuter line.

The New York metropolitan region had faced the threat of a massive disruption because rail workers, unlike most local-government employees, are still allowed to walk off their jobs, thanks to a 90-year-old federal law. Congress should amend that law, the Railway Labor Act, so that it no longer gives rail workers at public agencies like NJ Transit leverage to threaten strikes during negotiations. Those employees, instead, should be subject to the same local laws governing labor relations that apply to other public workers, who are banned from striking because of the havoc that government-employee walkouts would cause to public services and safety.

The Railway Labor Act had its genesis in the crucial role that freight transportation played in the American economy in the early 20th century. The act, passed in 1926, called for federal mediation of disputes - but it also gave unions the right to strike.

As rail's importance declined, especially after World War II, its profits diminished. Railroads cut loose their less-profitable passenger operations, sparking in the New York metropolitan region a lively debate about whether local government should assume responsibility for these costly operations - above all, the rich contracts and generous work rules that some employees enjoyed, thanks to years of bargaining under the Railway Labor Act.

In the 1960s and 1970s, states and cities experienced widespread, disruptive work stoppages by public employees, including teachers and local transportation workers, and many subsequently banned strikes. But in 1981, the Supreme Court rejected an effort by the Metropolitan Transportation Authority (MTA) to withdraw unionized workers at the Long Island Railroad (LIRR) from the purview of the federal act. In the aftermath of the court ruling, state lobbied Congress to amend the act to exempt publicly subsidized commuter operations. But efforts to change the law failed.

Under pressure from Washington, states gradually absorbed commuter operations from Conrail and other private carriers. By 1989, 12 publicly owned commuter lines around the country, including SEPTA in Pennsylvania and METRA in Illinois, operated with unionized workers bargaining under the federal act. The biggest impact remains in greater New York, where more than 400,000 daily commuters ride on publicly owned train lines, the labor operations of which fall under federal labor law. The region has paid dearly in higher costs and commuting disruptions.

In 1980, for instance, rail unions struck PATH for 79 days, forcing 80,000 commuters to scramble for alternate means of getting to work until the unions settled. In 1987, unionized LIRR workers stranded 150,000 commuters with an 11-day walkout - the fifth LIRR strike since the state had formed the railroad 21 years earlier. Often the public paid dearly. In 1994, the MTA abruptly capitulated to union demands in order to end a two-day strike at the LIRR. "I just agreed to pay ransom," said MTA chairman Peter Stangl of the deal, and his chief negotiator, Gary Dellaverson (who also represented NJ Transit in its recent talks), admitted: "We conceded, absolutely." The head of an LIRR commuters' group decried the frequent threat of strikes and called the union "bullies."

NJ Transit officials faced similar pressure to settle with unions. A study by the New York City Partnership, a business group, estimated that a transit strike would cost city businesses $5.9 million per hour in lost productivity. Commuter groups worried, too, when NJ Transit said that alternate commuting measures that it had set up would accommodate only half of those who generally cross the Hudson into Manhattan.

To craft a deal, NJ Transit backed off some of its key demands - especially that workers pay up to 10 percent of salary toward health costs. Currently, workers contribute just 1.8 percent of salary, and, under the new eight-year deal, that amount will rise to just 2.5 percent. The lack of union concessions means that the financially troubled NJ Transit - which has raised fares on passengers twice in the last five years, including a 25 percent hike in 2010 - will continue to struggle. Employee costs represent 55.4 percent of its operating budget. Employee benefits alone amount to $439 million and consume nearly half of all revenues collected from riders. That's one reason why the agency needs more than $1 billion a year in government subsidies to keep going.

"A strike of public employees manifests nothing less than an intent on their part to prevent or obstruct the operations of government until their demands are satisfied," wrote President Franklin Roosevelt in a 1937 letter to the National Federation of Federal Employees. Roosevelt understood the threat when workers who are stewards of a crucial public asset like a rail system threaten to walk out, and he declared that "militant tactics have no place in the functions of any organization of Government employees."

Congress should remind itself of FDR's wisdom on this issue and put an end to the nasty game of transit-strike threats.

Steven Malanga is the senior editor of City Journal, a senior fellow at the Manhattan Institute, and the author of "Shakedown: The Continuing Conspiracy Against the American Taxpayer." smalanga@city-journal.org