days, had been suffering heart and other health problems.
The current mayor, Michael Bloomberg, praised Koch as a "tireless, fearless and guileless civic leader" for his role in pulling New York back from the brink of financial collapse in the late 1970s.
"Ed helped lift the city out of its darkest days and set it on course for an incredible comeback," Bloomberg said, ordering flags to be lowered to half-mast.
Koch's greatest success was in his tough financial management during three terms between 1978 and 1989. But he also presided over an era when AIDS, homelessness, crime and racial tensions were rampant in the Big Apple.
More than anything Koch is remembered for his salty and colorful New Yorker style and sense of humor.
Koch frequently walked in public or stood outside subway stations, earning a reputation as man of the people.
"How'm I doin'?" was his trademark greeting to voters.
The Democrat was famous for his accessibility and willingness to discuss any subject with the exception of his private life.
Arthur Browne, a reporter at the New York Daily News tabloid during the Koch era, remembered him for bringing in journalists every morning for a no-holds barred question and answer session.
"He was the most open to the press mayor that New York City has ever had," Browne told NY1 television.
"He was a quirky quintessential outsider New Yorker who was very funny, entertaining.... People tended to love him."
Veteran US Congressman Charles Rangel said that even the many who clashed with Koch recognized his sincerity and passion.
"He has to go down as one of the most unforgettable mayors that New York City's ever had," Rangel said on NY1, noting "it would be hard to win a public debate with Ed Koch."
"Sometimes he would say some mean things and he never would apologize," Rangel added.
Former New York governor Eliot Spitzer, referred to Koch's "bond" with ordinary people.
"He said what people were thinking. He didn't sugarcoat it," Spitzer said.
Koch won election to City Hall at a time when New York was in chaos, with crime out of control and the Bronx targeted by rampant arson attacks. Among his major initiatives was to restore public housing in near-abandoned neighborhoods.
He also took on trade unions in a monumental struggle to restore New York's budget to health. But in his third term, race divisions, an explosion of AIDS and crack-cocaine related crime piled on the pressure, augmented by a major City Hall corruption scandal.
His bid for a fourth term failed when David Dinkins became the city's first black mayor in 1989.
US Congressman Jose Serrano, who represents the Bronx, said Koch was an unusually natural politician and a true New Yorker.
"'How'm I doin'?' was never about him, it was about New York," Serrano said.