NEW YORK (AP) — Ed Koch's favorite moment as mayor of New York City, fittingly, involved yelling.
Suddenly inspired to do something brash about the rare transit strike that crippled the city in 1980, he strode down to the Brooklyn Bridge to encourage commuters who were forced to walk to work instead of jumping aboard subway trains and buses.
"I began to yell, 'Walk over the bridge! Walk over the bridge! We're not going to let these bastards bring us to our knees!' And people began to applaud," the famously combative, acid-tongued politician recalled at a 2012 forum.
His success in rallying New Yorkers in the face of the strike was, he said, his biggest personal achievement as mayor. And it was a display that was quintessentially Koch, who rescued the city from near-financial ruin during a three-term City Hall run in which he embodied New York chutzpah for the rest of the world.
Koch died at 2 a.m. Friday from congestive heart failure, spokesman George Arzt said. He was 88. The funeral will be Monday at Temple Emanu-El in Manhattan.
Koch was admitted to NewYork-Presbyterian/Columbia hospital on Monday with shortness of breath, and was moved to intensive care on Thursday for closer monitoring of the fluid in his lungs and legs. He had been released two days earlier after being treated for water in his lungs and legs. He had initially been admitted on Jan. 19.
After leaving City Hall in January 1990, Koch battled assorted health problems and heart disease.
The larger-than-life Koch, who breezed through the streets of New York flashing his signature thumbs-up sign, won a national reputation with his feisty style. "How'm I doing?" was his trademark question to constituents, although the answer mattered little to Koch. The mayor always thought he was doing wonderfully.
Former Mayor David Dinkins, who succeeded Koch, called the former mayor "a feisty guy who would tell you what he thinks."
"Ed was a guy to whom I could turn if I wanted a straight answer," he told Fox 5 News Friday.
Bald and bombastic, paunchy and pretentious, the city's 105th mayor was quick with a friendly quip and equally fast with a cutting remark for his political enemies.
"You punch me, I punch back," Koch once memorably observed. "I do not believe it's good for one's self-respect to be a punching bag."
His hospitalization forced him to miss this week's premiere of a new documentary about his career. "Koch" opens in theaters nationwide on Friday.
The mayor dismissed his critics as "wackos," waged verbal war with developer Donald Trump ("piggy") and fellow former mayor Rudolph Giuliani ("nasty man"), lambasted the Rev. Jesse Jackson, and once reduced the head of the City Council to tears.
"I'm not the type to get ulcers," he wrote in "Mayor," his autobiography. "I give them."
When President George W. Bush ran for re-election in 2004, Democrat Koch crossed party lines to support him and spoke at the GOP convention. He also endorsed Mayor Michael Bloomberg's re-election efforts at a time when Bloomberg was a Republican. Koch described himself as "a liberal with sanity."
In a statement Bloomberg said the city "lost an irrepressible icon" and called Koch its "most charismatic cheerleader."
"Through his tough, determined leadership and responsible fiscal stewardship, Ed helped lift the city out of its darkest days and set it on course for an incredible comeback," Bloomberg said.
Koch was also an outspoken supporter of Israel, willing to criticize anyone, including President Barack Obama, over decisions Koch thought could indicate any wavering of support for that nation.
In a WLIW television program "The Jews of New York," Koch spoke of his attachment to his faith.
"Jews have always thought that having someone elevated with his head above the grass was not good for the Jews. I never felt that way," he said. "I believe that you have to stand up."
Under his watch from 1978-89, the city climbed out of its financial crisis thanks to Koch's tough fiscal policies and razor-sharp budget cuts, and subway service improved enormously. But homelessness and AIDS soared through the 1980s, and critics charged that City Hall's responses were too little, too late.
Koch said in a 2009 interview with The New York Times that he had few regrets about his time in office but still felt guilt over a decision he made as mayor to close Sydenham Hospital in Harlem. The move saved $9 million, but Koch said in 2009 that it was wrong "because black doctors couldn't get into other hospitals" at the time.
"That was uncaring of me," he said. "They helped elect me, and then in my zeal to do the right thing I did something now that I regret."
His mark on the city has been set in steel: The Queensboro Bridge — connecting Manhattan to Queens and celebrated in the Simon and Garfunkel tune "The 59th Street Bridge Song (Feelin' Groovy)" — was renamed in Koch's honor in 2011.
Koch was a champion of gay rights, taking on the Roman Catholic Church and scores of political leaders.
During the 1977 mayoral campaign against Mario Cuomo, posters that read, "Vote for Cuomo, Not the Homo" mysteriously appeared in some neighborhoods as Election Day approached.
A lifelong bachelor, Koch offered a typically blunt response to questions about his own sexuality: "My answer to questions on this subject is simply, 'F--- off.' There have to be some private matters left."
Koch said in 1989 that that his biggest regret as he left office was that "Many people in the black community do not perceive that I was their friend."
During the 1988 presidential campaign, Koch said that "Jews and other supporters of Israel would be crazy" to vote for Jesse Jackson. The remark caused a black backlash that carried into the 1989 Democratic mayoral primary, when Dinkins took 97 percent of the black vote.
Koch said the second half of his remark about Jackson went unheeded. It was, "... in the same way that blacks and supporters of black causes would be crazy to vote for George Bush."
Jackson on Friday said in a statement that Koch's "leadership and legacy will never be forgotten in New York City, New York state or our nation."
Koch was fast-talking, opinionated and sometimes rude, becoming the face and sound of New York to those living outside the city. Koch became a celebrity, appearing on talk shows and playing himself in movies including "The Muppets Take Manhattan" and "The First Wives Club" and hosting "Saturday Night Live."
In 1989's "Batman," the character of Gotham City's mayor, played by Lee Wallace, bore a definite resemblance to Koch.
When Koch took over from accountant Abe Beame in 1978, one thing quickly became apparent — with this mayor, nothing was certain. Reporters covered him around the clock because of "the Koch factor," his ability to say something outrageous any place, any time.
After leaving office, he continued to offer his opinions as a political pundit, movie reviewer, food critic and judge on "The People's Court."
Koch remained a political force in Albany well into old age. He secured a promise in 2010 from then-aspiring Gov. Andrew Cuomo and a number of state legislators to protect the electoral redistricting process from partisanship — and then vocally protested when Cuomo and others reneged on that pledge two years later.
Even in his 80s, Koch still exercised regularly and worked as a lawyer for the firm Bryan Cave.
At his 80th birthday bash, Bloomberg said Koch was "not only a great mayor and a great source of advice and support to other mayors, he happens to be one of the greatest leaders and politicians in the history of our city."
He had been in the hospital twice in 2012, for anemia in September and then for a respiratory infection in December. He returned twice in January 2013 with fluid buildup in his lungs.
He had undergone surgery in June 2009 to replace his aortic valve and gallbladder surgery a month later. He had a pacemaker inserted in 1991 and was hospitalized eight years later with a heart attack. In early 2001, he was hospitalized with pneumonia.
Koch was born in the Bronx on Dec. 12, 1924, the second of three children of Polish immigrants Louis and Joyce Koch. During the Depression the family lived in Newark, N.J.
The future mayor worked his way through school, checking hats, working behind a delicatessen counter and selling shoes. He attended City College and served as a combat infantryman in Europe during World War II, earning his sergeant stripes.
He received a law degree from New York University in 1948 and began practicing law in Manhattan's Greenwich Village neighborhood, where his political career began as a member of the Village Independent Democrats, a group of liberal reformers. He defeated powerful Democratic leader Carmine DeSapio, whose roots reached back to the corrupt Tammany Hall political machine, in a race for district leader.
Koch was elected to the City Council and then to Congress, serving from 1969-77 as representative for the "Silk Stocking" district that was then known for its millionaire Park Avenue constituency.
The liberal Koch was the first Democrat to represent the district in 31 years. But his politics edged to the center of the political spectrum during his years in Congress and pulled to the right on a number of issues after becoming mayor.
His answer to the war on drugs? Send convicted drug dealers to concentration camps in the desert. Decaying buildings? Paint phony windows, complete with cheery flowerpots, on brick facades. Overcrowded city jails? Stick inmates on floating prison barges.
Koch defeated incumbent Beame and future Gov. Mario Cuomo in the Democratic primary to win his first term in City Hall. Like his hero Fiorello LaGuardia, the fiery fusion party mayor who ran the city from 1933 to 1945, he ran on the Republican and Conservative party lines in the 1981 mayoral election.
He breezed to re-election in both 1981 and 1985, winning an unprecedented three-quarters of the votes cast. At the time, he was only the third mayor in city history to be elected to three terms.
While mayor, he wrote three books including the best-seller "Mayor," ''Politics" and "His Eminence and Hizzoner," written with Cardinal John O'Connor. He wrote seven other nonfiction books, four mystery novels and three children's books after leaving office.
Early in his second term, Koch flip-flopped on his pledge to remain at City Hall and decided to run for governor against then-Lt. Gov. Mario Cuomo. But his 1982 gubernatorial bid blew up after Koch mouthed off about life outside his hometown.
"Have you ever lived in the suburbs?" Koch told an interviewer who asked about a possible move to Albany. "It's sterile. It's nothing. It's wasting your life."
During the same interview he said that life in the country meant having to "drive 20 miles to buy a gingham dress or a Sears, Roebuck suit."
It cost him the race, but it convinced many of the 8 million city residents that Koch belonged in New York. Meanwhile, Cuomo went on to serve three terms as governor.
Koch's third term was beset by corruption scandals. Queens Borough President Donald Manes — a close ally — committed suicide in March 1986, after having resigned over kickback and patronage allegations. Bronx Democratic leader Stanley Friedman and three others were also tarred. Koch's commissioner of cultural affairs, former Miss America Bess Myerson, stepped down in the wake of a scandal involving her boyfriend and a judge overseeing a legal case concerning him.
As the pressure grew, Koch suffered a minor stroke in 1987.
The administration was also beset by racial unrest, first after the 1986 death of a black youth at the hands of a white gang in Howard Beach and three years later after a black teen was shot to death in Brooklyn's tough Bensonhurst neighborhood by a group of whites.
Six weeks after the second slaying, Koch lost the Democratic primary to Dinkins, the city's eventual first black mayor. Koch later said the simmering racial tensions didn't lead to his defeat.
"I was defeated because of longevity," Koch said. "People get tired of you. So they decided to throw me out."
The man who bragged that he would always get a better job, but New Yorkers would never get a better mayor, left his City Hall office for the last time on Dec. 31, 1989.
Looking back, Koch said in a 1997 interview: "All I could think of was, "Free at last, free at last, great God almighty, I'm free at last."
He was finished with public office, but he would never be through with the city. At age 83, Koch paid $20,000 for a burial plot at Trinity Church Cemetery, at the time the only graveyard in Manhattan that still had space.
"I don't want to leave Manhattan, even when I'm gone," Koch told The Associated Press. "This is my home. The thought of having to go to New Jersey was so distressing to me."
Not long after buying the plot, he had his tombstone inscribed and installed. The marker features the last words of slain Wall Street Journal reporter Daniel Pearl: "My father is Jewish, my mother is Jewish, I am Jewish."
It also includes a Jewish prayer and the epitaph he wrote after his stroke:
"He was fiercely proud of his Jewish faith. He fiercely defended the City of New York, and he fiercely loved its people. Above all, he loved his country, the United States of America, in whose armed forces he served in World War II."
Koch was survived by his sister, Pat Thaler, and many grandnieces and grandnephews.
Associated Press writer Samantha Gross contributed to this report.