For years, United Nations diplomats were notorious for running up millions of dollars in parking tickets, then just laughing at the city's attempts to collect. Diplomatic immunity meant there was little U.S. courts could do about it.

But the city's thousands of foreign officials have largely changed their ways since a threatened crackdown three years ago.

According to New York's finance department, diplomats have gotten 90 percent fewer tickets since late 2002, when the U.S. threatened to revoke the plates of scofflaws and subtract however much they owed in fines from the foreign aid their countries received.

Those who do get citations have gotten better about paying them. Of the 11,771 parking violations issued to diplomats in the past three years, 87 percent have been paid or successfully appealed, the city said. Many of the remainder are still working through the legal system.

"When diplomats do receive tickets, they are contesting and paying them just like regular New Yorkers," said Finance Commissioner Martha E. Stark.

On Thursday, the only obvious parking violators near the U.N. appeared to be cars bearing regular New York plates illegally parked in spots reserved for diplomats.

But that has not always been the case.

Between April of 1997 and October of 2002, holders of diplomatic plates racked up 205,732 parking tickets in New York. About $18.1 million of those fines have yet to be paid.

The tally so outraged then-Mayor Rudolph Giuliani that he threatened to tow away diplomatic vehicles and sell them.

His successor, Michael Bloomberg, cut a deal with the State Department in 2002 to get tough on the scofflaws.

"Nothing gets New Yorkers more angry then when diplomats think they can live by different rules than the rest of us," said Sen. Charles Schumer, D-N.Y., who pushed through a renewal this fall of the legislation allowing unpaid taxes and fines to be deducted from aid payments.

So far, the measure has been less successful in helping the city collect $200 million in property taxes it claims are owed by foreign countries.

Embassies, consulates and diplomatic missions are generally tax-exempt, but New York has insisted it may tax parts of buildings used for non-diplomatic purposes, such as housing or restaurants.

The city has been tied up in court for two years with India, the Philippines and the Mongolian Peoples Republic over their respective tax bills of $27.8 million, $29.6 million and $3.4 million.

Robert A. Kandel, an attorney representing those countries, said most of that alleged debt is interest on disputed bills that are years or decades old.

"These foreign governments are very respectful of the city's obligations and are not taking these positions casually, but solely as a matter of the highest principle of international law," he said.

Other countries with unpaid tax bills are Hungary ($62 million), Libya ($4.3 million), Rwanda ($1.3 million), Nigeria ($1.1 million) and Uganda ($559,750).

Federal law allows U.S. aid money to be deducted only after a court renders a final judgment in a tax dispute, and that has yet to happen.

The result of New York's legal battle will probably be noted across the Atlantic, where American diplomats are in a tax brouhaha of their own.

In July, the U.S. ambassador to England ordered his sizable diplomatic staff to stop paying a $14-per-day toll for vehicles entering central London. International treaties, he said, prohibited taxes of any sort on diplomats.

Since then, U.S. officials in London have refused to pay hundreds of thousands of dollars in tolls and fines.