Although he formally left office in 1990, former New York Mayor Edward I. Koch never left the public spotlight. He likely helped save the nation’s biggest metropolis from collapse 35 years ago after it nearly went bankrupt. But then he overstayed his welcome.

Koch, 88, who died Friday, never kept his mouth shut. Shrewdly, he kept tabs on public opinion by asking citizens big and small, “How’m I doing?” whether it was in City Hall, a hotel kitchen or the subway, which he used regularly. And when the transit workers went on strike and shut the subway down, he led New Yorkers in defiance by walking across the Brooklyn Bridge to work and asking citizens to try to do the same.

The city’s second Jewish mayor, Koch had a Catskills-style manner that at times was a huge turnoff. His political skills didn’t travel outside the city very well, especially when he attacked the habits of people who didn’t live there when he ran in the 1982 Democratic primary for Governor of New York and was trounced by Lieutenant Gov. Mario M. Cuomo. The campaign against him was masterminded by Andrew Cuomo, now New York's governor.

Working largely with Felix Rohaytn, at the time a managing partner of Lazard Freres (NYSE:LAZ), Koch helped New York get out of its financial woes under the guidance of the Municipal Assistance Corp., known as Big Mac, a quasi-state agency that allowed the city to issue bonds to finance its recovery.

Big Mac was established under Mayor Abe Beame, whom Koch, then a congressman from Manhattan’s Upper East Side, defeated for renomination in the 1977 Democratic mayoral primary. Under Beame, an accountant and former city comptroller, New York had engaged in “creative accounting” tricks that allowed for budget mismanagement for years, starting with Beame’s predecessor, Republican Mayor John V. Lindsay.

When Koch ran the first time, his political guru, David Garth, ran commercials asking voters, "Isn't it time for competence for a change?"

Over time, the discipline of Big Mac worked, and, ultimately, the city’s creditors and bondholders were paid off. That allowed Koch to start spending more on police, repairing the city’s dilapidated infrastructure such as the crumbling Manhattan Bridge and dealing with education, then still under Lindsay’s “community control” scheme that extinguished central authority.

Koch, when he ran the first time, was a death-penalty advocate and insisted he would work with the cops to deal with New York’s soaring crime rate, subway vandalism and other problems. With the help of several nonpolitical police commissioners such as Robert McGuire, he boosted the police department and ended the last vestiges of the “Serpico” scandals that emerged under Lindsay.

Over time, as finances improved, Koch added to city budgets, dealing with new problems that arose in the 1980s, especially the homeless. At the time, thousands of people were sleeping at night in Pennsylvania Station, in Grand Central Station and on the steps of churches and businesses.

Then, he allocated funds to board up abandoned apartments and houses in the Bronx that won criticism, but Koch said he needed to start with cosmetics, then hope real development would follow. Today, those buildings along the Cross Bronx Expressway are filled with new tenants and owners.

Other problems that beset Koch were the first inklings of the AIDS epidemic, a flood of new immigrants into the city and continued dealings with Washington under President Ronald Reagan, whose Republican administration slashed urban aid and federal funds for transportation.

Koch was a master politician throughout his first two terms, coasting to reelection in 1981 and 1985 but relying on traditional Democratic Party bosses in Brooklyn, Queens and the Bronx, who got into trouble with Reagan’s U.S. Attorney Rudolph W. Giuliani.

By his third term, several of his key allies had been jailed. Borough President of Queens Donald Manes committed suicide after allegations of massive corruption and sexual abuse at the city Parking Violations Bureau, where he and Koch had installed a loyal patronage employee.

Then, too, Koch’s brittleness and conservatism on many issues wore thin. Minorities, who had become a majority of the city's electorate, despised him.

When he ran for reelection in 1989, he was defeated in the Democratic primary by David N. Dinkins, the Manhattan borough president, who went on to become New York’s first African-American mayor in 1990.

Savior of New York. Big mouth. Opinionated. Political. Koch’s act could have played only in New York. For much of his time in office, he played it well.