NEW YORK -- A decade after the nation's largest city nearly went broke, New York stands undisputed as the world's financial capital. Its coffers, then $1.8 billion in the red, overflow with a $660 million budget surplus, unemployment is at a 14-year low and ever-taller, ever-flashier skyscrapers crowd Manhattan Island.

So why was Mayor Edward I. Koch posing in newspaper ads a few weeks ago hammering plywood to shut off the entrance of the Holland Tunnel to New Jersey? "New Jersey? No Way!" the caption read.

The stunt was the latest salvo in the fight to curtail corporate desertions. Mobil Oil is moving to Virginia, J.C. Penney to Texas, TWA to Westchester County. NBC is talking of joining brokerage house Paine Webber, accounting giant Peat Marwick Mitchell, Exxon and dozens of others that are moving thousands of jobs across the Hudson River to the Garden State.

"New York City has been reborn in the last decade," Koch says. But he warns, "These move-outs are a reminder that we . . . cannot take our healthy economy for granted."

In fact, pessimism about the city's future is widespread. An 18-month wave of corruption scandals has handicapped its leadership. A housing crisis is flooding the streets with homeless beggars and threatens to leave the city 350,000 units short in the next decade -- even as the city flaunts its wealth, from the gaudy penthouses of the new rich to the recent New York Times headline, "Feeling Poor on $600,000 a Year."

The stake here is not just quality of life, but the soul of a city that has prided itself on being the rudest, richest, most restless, energetic and frenetic, powerful and egomaniacal metropolis on Earth.

This series examines New York 12 years after it first teetered on the edge of bankruptcy, inspiring the New York Daily News headline: "FORD TO CITY: DROP DEAD." With characteristic contrariness, it flourished, and nowhere more ostentatiously than in Manhattan. But the recovery bypassed the city's poorest areas, and nowhere more starkly than the South Bronx, perhaps the nation's most famous slum.

The uneven boom was driven by an administration whose chief mission was to balance the books. "When I came into office 10 years ago, people said the city was going to go bankrupt in 60 days . . . . I felt I had to put together all these groups that were needed to win the battle to save the city of New York -- the labor unions, the banks, the government people, public officials, politicians," Koch said in a recent interview.

Now, many of those officials are under indictment or investigation for the way they used their influence. Koch says corruption is individual, not systemic, but U.S. Attorney Rudolph W. Giuliani says the city tolerates enough of it to raise the cost of living and working here.

"New York is a very seriously ill place," said Alex Garvin, a former city planning director who teaches urban studies at Yale. "For two centuries, we have been the place people come to when they want to be the best, whether they are actors, musicians, lawyers, advertising executives. But I don't think we perform that function now because nobody can afford to come here anymore."

Koch's Commission on the Year 2000 reported recently that New York is still "the country's center of creativity in such fields as communication and the arts." The city remains a magnet for immigrants seeking some of that vitality. One-fourth of the city's 7.3 million residents are foreign-born. A recent survey of taxi driver applicants found they came from 82 countries: Albania to Yemen.

But the commission warned that New York's "role as incubator, creator and stimulator is being challenged by other cities in this country and abroad." It noted that the city has grown "too fast, too large and too dense;" the price is "a harsh and uncivil environment," and the city "may be permitting that environment to worsen."The New Jobs: White-Collar Concentration

Between 1969 and 1977, New York lost 600,000 jobs. Since then, it has attracted 300,000 new private-sector jobs. According to the commission, it will gain another 300,000 jobs by the turn of the century, bringing the city full circle in 30 years.

But many of the old jobs, lost to foreign competition and other forces, were manufacturing jobs for garment workers, longshoremen, machinists -- the semiskilled opportunities that sustained the promises engraved on the Statue of Liberty.

Most new American jobs, and 90 percent of new jobs here, are in service industries. Elsewhere, the majority are low-paying and unskilled: bus boys, waitresses, janitors, maids. Here, most are for college graduates: computer programmers, stockbrockers, legal secretaries. Yet, 40 percent of the city's adult workers lack a high school diploma, more than half of the blacks and Hispanics in high school drop out and many students graduate without basic skills. This year, the New York Telephone Co. tested 22,880 applicants for entry-level jobs such as telephone operator. Eighty-four percent failed.

Some also fear that the city relies too heavily on financial-service companies -- banking, insurance, law, accounting and securities firms -- and could be as vulnerable to an economic downturn as Houston was to the oil glut. "The loss of diversity spells vulnerability," said Samuel Ehrenhalt, regional chief of the U.S. Bureau of Labor Statistics. "New York city lost one out of four manufacturing jobs -- three times the national rate -- during the 1980s. It has based its growth on putting more and more eggs in fewer baskets."

"We're going to face a recession -- it should have been here by now," said investment banker Felix Rohatyn, chairman of the state's Municipal Assistance Corp., which oversaw the fiscal comeback. "When it happens, there will be a weak stock market, and the ripple effect in New York will be felt from the investment banks that have been living very high, to the real estate market, to the high-fashion boutiques."

Koch, however, said that with 350,000 businesses, "There is sufficient diversity" to withstand a downturn. He notes that no single company employs even 1 percent of the work force.

Imperiled or not, the boom has been spectacular. Following global economic forces, foreign banks and investors crowded into Manhattan, shifting business from London and elsewhere. New York banks now process $1.5 trillion in payments each day, equal to a third of the U.S. annual gross national product.

Although some are preparing for retrenchment, many securities firms have doubled or tripled in size in the last five years. The number of employes at Salomon Brothers grew 40 percent last year, Morgan Stanley 35 percent, and the 25-year-old investment banker earning $500,000 a year is as much an emblem of the boom as the Ivan Boesky scandal.

To house these giant firms, more than 75 office towers have been built in Manhattan in the past seven years. Dozens of new residential high-rises offer one-bedroom apartments for $2,000 a month. A ripple effect in the boroughs has raised the value of an Archie Bunker-like rowhouse in Queens from $35,000 to more than $200,000 in 10 years. Urban Aggravation: 'Why Are We Here?'

From the 19th floor of a 42nd Street skyscraper, Jerry W. Kolb, vice chairman of Deloitte, Haskins & Sells, the nation's sixth largest accounting firm, would seem to be sitting atop the boom. But he and his 70 partners are moving the headquarters of the 26,000-employe firm, based here since 1895, to Connecticut or Westchester County. Only one partner lives in New York city.

"The high cost of housing drives people further and further out of the city," said Kolb, who lives in Greenwich, Conn. "The increasingly long commute makes it difficult for people to be productive and creative. New York is the only major city with a 35-hour standard work week. After we move, our people will work 37.5 or 40 hours."

Other aggravations mount. "You walk out of Grand Central Station," Kolb said. "On the south side of the street, you thread your way through garbage pickers. On the north side, you deal with the panhandlers. If there's water on the street, the cabs will do their best to spray it on your carefully pressed suit. You don't have to be a creative genius to ask the question: Why are we here?"

But Koch says corporations are moving to "save money," since many can rent or sell their headquarters here for huge sums. He urges them to sit tight, saying that high taxes and energy costs will be reduced considerably in the next five years.

But housing remains a critical factor. On Broadway and 86th one summer day, a mimeographed sheet taped to a lamppost read: "$3,000 reward for anyone with information leading to signed lease on two-bedroom apartment. Responsible working couple willing to pay up to $1,000 rent per month."

Such signs are common, as is "key money" -- payments to the landlord or the lease-holder of a rent-stabilized apartment. A recent survey found that, despite a vacancy rate of only 2 percent, landlords were holding as many as 90,000 apartments off the rental market illegally in hopes of higher profits when the buildings go cooperative.

The average price of a one-bedroom Manhattan co-op apartment is $242,760. A Brooklyn "car condominium" sells parking spaces for $34,000 each plus a $147-per-month maintenance and property tax fee.

Amid such feverish speculation, landlords have pushed out thousands of low-income tenants in order to rehabilitate buildings for luxury housing. In June, two men were convicted of hiring thugs to terrorize three West 77th Street buildings with break-ins, floods, fires and assaults.

Until recently, rehabilitation was subsidized by city tax breaks, insitituted to revive investment after the fiscal crisis. But rooming-house units housing the poor dropped from 110,000 to 15,000. With a homeless population of 27,000, the city has cut off incentives.

The city also has offered tax breaks, zoning concessions and choice city-owned land to developers, who were allowed to add more units if they would also build subway stations, add plazas with fountains and the like.

In the process, traditional neighborhoods are being uprooted. In the theater district, a major tourist draw, 23 office towers are being built or planned while two historic theaters, the Morosco and the Helen Hayes, were demolished. A $2 billion urban renewal plan for Times Square may engulf the area, as costume makers, agents and set designers disperse. Backlash: Fighting for 6 Feet of Grass

The past three years have produced a backlash. Koch has been criticized for accepting hundreds of thousands of dollars in campaign contributions from real estate developers. And critics portray his policies as a Faustian bargain: development at the price of damaging the city's physical and social fabric.

Public outcry is stopping or delaying some projects. Westway, a $4.2 billion highway development, was halted by lawsuits two years ago, and a compromise was reached last week on a scaled-down version. The Times Square project has encountered 27 lawsuits and may never be built. A few weeks ago, Shearson, Lehman Brothers, the giant securities firm, faced down a crowd of mothers and toddlers protesting the paving of a small park. After a court hearing, Shearson yielded six more feet of grass.

Concerns about overbuilding are "parochial," Koch told a businessmen's breakfast recently. "You will have community forces -- decent people -- who say no to everything. From their point of view, it's understandable -- 'Last one in, lock the door.' But it's not understandable if you're running the city."

Koch vigorously defends tax breaks for the office towers of AT&T, IBM and others. "Tax abatements of $1.3 billion will bring in $23 billion in taxes over the next 20 years," he said. "I don't have to be ashamed of what we've done."

A bitter feud between Koch and Donald Trump, the city's glitziest real estate mogul, may signal a shift in the treatment of developers. Trump had asked for zoning waivers and a $1 billion tax abatement to lure NBC to a $5 billion proposed development on Manhattan's West Side that would include a 152-story building, the world's tallest.

Koch balked, calling Trump "piggy, piggy, piggy." Trump, who contributed $42,500 to Koch's last campaign and $250,000 to other city politicians, countered by calling the mayor a "moron," adding, "This city is a cesspool of corruption and incompetence."

As NBC officials scouted sites in New Jersey, Robert Wagner Jr., school board president and former deputy mayor, recalled the public-private alliance that led the city out of the fiscal crisis and mourned, "That era of good feeling is coming to an end."

A test may be the outcome of a battle over developer Mortimer Zuckerman's 68-story office complex planned for Salomon Brothers on city-owned land at Columbus Circle. The city and the Metropolitan Transit Authority authorized the builder to increase the size of the complex by 20 percent.

But the project would throw a permanent shadow over acres of Central Park. "It's not a building, it's a deadly weapon," said Philip K. Howard, counsel to the Municipal Arts Society, which has filed suit against the deal. Koch said the extra size was approved after Salomon Brothers threatened to leave the city.

The building boom has emphasized the sorry condition of the city's physical plant. The Jets left for New Jersey when they couldn't get the city to fix the toilets at Shea Stadium. The Yankees say they will stay only if the city gives over acres of public parks for parking spaces. Despite a proposed $41 billion program to repair roads, bridges and utility lines, much more may be needed. Schools are in disrepair: New York spends $69 a year per student on maintenance as compared to $159 spent in Baltimore and $283 in the District.

Despite $6 billion spent on the subways since 1981, the commission found "it will take another 15 years just to return the system to the levels of efficiency, comfort and reliability that existed in the 1950s."

Since 1948, as subway ridership plummeted, the number of cars entering Manhattan daily has grown from 657,000 to 1.7 million. Three or four new tunnels to New Jersey would be needed to accommodate expected growth unless the city bans single-passenger cars during rush hour, as has been proposed.

Nonetheless, the commission hopefully titled its report "New York Ascendent." "We have met great challenges before, and we can meet these," Koch said.

Others worry that the city may not be taking its problems seriously enough. When J.C. Penney announced its move, Deputy Mayor Alair Townsend was quoted as saying, "When I wake up next year, I will still be in New York, and where will they be? They will be in -- yuck -- Dallas."

If city officials react with that "kind of arrogance," predicted Kolb, the Deloitte executive, "whoever says it will be the last to turn out the lights."

NEXT: The South Bronx