President Obama wrote to congressional leaders Saturday, begging them to pass an emergency $50 billion rescue for cities and states. Problem is, the hundreds of billions that Washington has showered on those cities and states over the last two years has only “stimulated” more fiscal ruin. For proof, just look at New York Citys latest budget.

In the next week or so, Mayor Bloomberg and the City Council will finalize a $66 billion budget -- culminating a two-year spending increase of $3.4 billion, equivalent to 8 percent of city-funded outlays.

Thats right -- for all the talk of Draconian cuts, the city has watched spending soar at well over the (negligible) rate of inflation, even as a grim recession has hammered local taxpayers.

Thank the “stimulus” bill of February 2009, which threw nearly $300 billion at state and local governments -- including $4.8 billion in operating cash for New York City.

All the “temporary” stimulus did was let the politicians off the hook: No need to make politically tough cuts to get the fisc under control; just keep increasing outlays as if financial bubbles would keep saving us forever.

This has left New York worse off in two obvious ways:

* Obama and Congress took away the leverage City Hall and Albany would have had over intractable labor unions. With Washington minting up free money, teachers and other city employees knew last year that they didnt really have to give an inch on raises and benefits.

Bloomberg has used the threat of layoffs, for example, to get public-sector workers to negotiate. But while the city has cut 6,082 jobs in the last year, the 262,661-strong payroll is still 4,900 people above 2006 levels -- because Washington came in to “save” us.

* Washington allowed New York to load itself up with more debt. The stimulus bill also created new, subsidized “Build America Bonds” -- which New York has used to borrow $4.4 billion. The citys total bond debt is now nearly $68.4 billion, up by more than $7.9 billion since the start of the financial crisis.

With the stimulus running out, Bloomberg has been sounding tougher. Last month, he zapped planned raises for teachers, for example; earlier this year, he told other unions that they shouldnt expect pay hikes without big productivity improvements.

Enter Obama, with another bailout. In his Saturday letter, the president said that Congress failure to act would “mean hundreds of thousands of fewer teachers in the classrooms.” Indeed, he claimed, “their lost paychecks will mean less tax revenues.”

Actually, no. Union concessions could prevent teacher layoffs in New York. And labor givebacks would let the state and city avoid new tax hikes -- meaning more dollars in peoples pockets, more private-sector job creation and more demand.

Its irresponsible for Washington to dangle the lure of more stimulus just as states and cities are getting down to crunch time in their budget negotiations. Its also dangerous -- because states and cities will think the money will be there next year, again.

All of which makes it that much harder to get the citys labor costs down. If New York has to give out raises at the inflation rate, city spending will be another $1.8 billion higher in three years time, state comptroller Tom DiNapoli estimates -- and thats exactly what Obama is encouraging.

The best stimulus for New York would be for Congress to say that the feds will offer money only to state and local governments that win big union savings, scored independently.

Luckily for New York, Republicans and moderate Democrats in the House and Senate know that voters are tired of “stimulus” and worried about federal deficits. But weve got to count on out-of-staters to protect us. New Yorks own senators, Chuck Schumer and Kirsten Gillibrand, have voted to stimulate public-sector excess, bigger deficits and more private-sector joblessness.

But strange things have been happening nationwide this year. New Yorkers, too, could act strangely -- especially as they figure out they have a choice.

Attorney Bruce Blakeman, one of two would-be Republican challengers to Gillibrand this fall, said yesterday that he wouldnt vote for any more stimulus thats “more political patronage.” And hed insist that local aid be offset with other federal cuts and that it be “tied to fiscal discipline at the state and local level, too.”

Says economist David Malpass, Blakemans competitor for the GOP nod: “People are angry because we need an upheaval in the Washington-Albany spending culture. But instead these stimulus bills are just a coverup -- politics as usual. Rather than driving change, they are protecting the political machine, using mountains of debt.”

For New Yorks sake, lets hope the voters decide they dont want to be stimulated anymore -- and instead stimulate a competitive Senate election.