(NEW YORK) -- Ed Koch, the brash, colorful and often confrontational former New York mayor, has died. He was 88.
Spokesman George Arzt says Koch, who had been in and out of the hospital for the last three months, died at 2:00 a.m. Friday of congestive heart failure. He had been moved to the intensive care Thursday for closer monitoring of an iron deficiency and of fluid in his lungs and legs.
In December, Koch battled pneumonia and was being treated with antibiotics, and in September, he was hospitalized and was treated for anemia.
Koch took office on Jan. 1, 1978 with New York City all but broke. Thousands of cops, firemen, sanitation workers and teachers had been laid off. Bridges were crumbling, the subways were caked in grime and graffiti, and crime was taking off.
During three terms in office, Koch helped to restore the city's credit with budget cuts, and he revived the city's spirits with his unflagging enthusiasm for all things New York -- and an unflinching willingness to stand up to opponents.
Koch was forever dispensing opinions -- and forever asking New Yorkers, "How 'm I doing?" He attacked opponents as "crazy," "wackos" or "radicals." To critics who said he had drifted too far from his liberal roots, Koch said he was "a liberal with sanity."
"I'm the sort of person who will never get ulcers," Koch once said. "Why? Because I say exactly what I think. I am the sort of person who might give other people ulcers."
When the New York Giants won the Super Bowl in January 1987, Koch refused to allow a ticker-tape parade for the champs because the Giants had left New York for New Jersey's Meadowlands more than a decade earlier.
While such outspokenness endeared Koch to constituents, his sharp tongue contributed to his biggest political defeats.
In 1988, during the fiercely contested New York Democratic primary for president, Koch said Jewish voters would be "crazy" to support the Rev. Jesse Jackson. The remark infuriated and energized African-American voters, propelling Jackson to a surprising second-place finish behind Michael Dukakis.
The following year, the city's black voters got their revenge, helping Manhattan Borough President David Dinkins beat Koch in the 1989 Democratic primary. Dinkins went on to defeat former U.S. Attorney Rudolph Giuliani to become the city's first black mayor.
Arguably, Koch became even more popular after leaving City Hall. He hosted a radio show, wrote books, reviewed movies and even dispensed justice for a while on television's The People's Court, succeeding Judge Wapner.
Koch also remained a political force. His endorsements were crucial in helping to elect two Republicans -- Rudy Giuliani as mayor of New York, in 1993, and George Pataki, as governor of New York, in 1994. And his backing of then-first lady Hillary Clinton, a Democrat, eased the concerns of some older Jewish voters, helping her win a U.S. Senate seat in New York in 2000.
Koch will spend eternity in his beloved Manhattan. He announced in 2008 that he had purchased a plot at the Trinity Church cemetery, after learning that the church permits Jews to be buried there. It is the only active cemetery left in Manhattan.
"I don't want to leave Manhattan, even when I'm gone. This is my home," Koch explained. "The thought of having to go to New Jersey was so distressing to me."
Copyright 2013 ABC News Radio