One of the proudest moments of Ed Koch’s life came during a trip to Israel in 1990, in the midst of the first Palestinian intifada.

Koch had recently left City Hall after 12 years as mayor of New York City and was touring Jerusalem when a Palestinian threw a rock at his group, striking Koch in the head. The ex-mayor was bleeding a bit but wasn’t really hurt, and he mopped up the wound with his handkerchief.

The incident would become one of Koch’s favorite stories, the moment, he would say, when “I shed a little blood for the people of Israel.”

It was reflective of the pugnacity of the man who served three terms as mayor of New York, spent nine years in Congress, earned two battle stars as an infantryman in Europe during World War II, wrote 17 books, and spent the last two decades of his life as a lawyer, talk show host, professor and even restaurant critic -- working almost to his last day.

Koch, 88, died of congestive heart failure early Friday morning at New York-Presbyterian Columbia Hospital. He had been hospitalized twice in recent weeks to drain fluid from his lungs. His death came on the same day as "Koch," a documentary about his life, opens in theaters nationwide.

Tributes to Koch immediately poured in from all corners of the Jewish world, including the Israeli ambassador to the United States, and both sides of the political aisle.

"Mayor Koch was a passionate and principled leader and an outspoken defender of Israel and the Jewish community," said Matt Brooks, the director of the Republican Jewish Coalition. "He chose principle over politics and didn’t engage in partisan bitterness."

The National Jewish Democratic Council hailed Koch as a “consummate and proud Jewish Democrat who advocated fiercely for the U.S.-Israel relationship and the progressive domestic policies in which he truly believed."

Famous for greeting constituents with "How'm I doin?," the Jewish mayor presided over some of the city's most difficult years, from 1978 to 1989, and helped spur the recovery that would flourish under one of his successors, Rudy Giuliani.

Edward Irving Koch was born in the Bronx on Dec. 12, 1924 to Jewish immigrants from Poland. The family moved to Newark, N.J., when Koch was 9, after his father’s fur shop closed during the Depression, but returned to New York in 1941 when business picked up again. After high school, Koch enrolled at City College and worked as a shoe salesman, but his studies were interrupted when he was drafted into the army in 1943.

He served in the infantry and after the war spent time in Bavaria helping replace Nazis who occupied public posts with non-Nazis, according to The New York Times. He was discharged in 1946 and went to law school at New York University.

Koch got his start in politics as a Democratic district leader in Greenwich Village, then worked his way up to City Council, and in 1968 beat incumbent Whitney North Seymour Jr., a Republican, in a race for Congress. Though he served for nine years in Washington, Koch remained a creature of New York, saying he got the “bends” whenever he stayed away from the city for too long, according to the Times.

In 1977, Koch ran for mayor, upsetting Abraham Beame, another Jewish mayor who oversaw a fiscal crisis that brought New York to the edge of bankruptcy. Upon taking office, Koch immediately set to cutting the municipal budget, trimming the city’s workforce, reaching a settlement with unions and securing federal aid that had been denied to Beame. In his second term, he turned the $400 million deficit he had inherited into a $500 million surplus.

He won a third term with 78 percent of the vote, but then things went sour. His administration was beset by a series of corruption scandals, rising drug-related violence and burgeoning racial tensions. Koch became the target of black ire for closing a hospital in Harlem -- a move he later conceded had been a mistake -- and for saying that Jews would be “crazy” to vote for the Rev. Jesse Jackson in the 1988 presidential primary, given Jackson’s support for Palestinians and his 1984 reference to New York as “Hymietown.”

After losing his bid for election to a fourth term in 1989 when David Dinkins bested him in the Democratic primary, Koch retired into a happy existence as a Jewish Yoda, blessing or cursing political figures as he saw fit and not always hewing to the prescripts of the Democratic Party.

In his later years, Koch seemed to swing like a pendulum between Democrats and Republicans, and his political imprimatur was eagerly sought by both sides.

He endorsed Giuliani, a Republican, in his successful mayoral bid in 1993 against Dinkins. He often shared -- and sometimes took over -- the stage at endorsements for other Republicans, including New York Gov. George Pataki, Sen. Al D'Amato and New York City Mayor Michael Bloomberg.

Four years later, Republicans hoped to win a repeat endorsement for Sen. John McCain (R-Ariz.), but Koch, alarmed at what he saw as Republican plans to degrade the social safety net he had championed as a congressman in the 1970s, instead threw in with Barack Obama.

Almost as soon as Obama became president, however, Koch became one of his biggest Jewish detractors, lacerating the president with criticism for his perceived coolness to Israel.

“I believe we are seeing a dramatic change in the relationship between the United States and the State of Israel that adversely affects the State of Israel and it is being orchestrated by President Barack Obama,” Koch said in early 2010, after a cool meeting between the president and Israeli Prime Minister Benjamin Netanyahu. “The president, when he invited the prime minister of Israel, Netanyahu, to the White House, was extremely rude to him, treated him as though he were a Third World tyrant.”

In 2011, Koch endorsed Republican Bob Turner for a special election to fill a vacant congressional seat in New York in what was seen as a safe Democratic district, even though the Democratic contender, David Weprin, was both Jewish and stridently pro-Israel. Turner won and many credited Koch’s endorsement with tipping the scales during the campaign. When Obama subsequently retreated from criticism of Israel's settlement policies, Koch claimed credit.

"I believe the recent vote in the 9th Congressional District in New York affected in a positive way the policy of the U.S. on the Mideast," Koch wrote supporters in an email.

Last year, Koch enthusiastically endorsed Obama in a long video released just before the election -- an appearance Jewish Democrats credit with helping boost Obama's Jewish numbers in Florida, a critical swing state.

Yet in recent weeks Koch turned on Obama again, making no secret of his disappointment in Obama's choice of Chuck Hagel, a former Republican senator with a fraught relationship with the pro-Israel community, for secretary of defense.

“Frankly, I thought that there would come a time when he would renege on what he conveyed on his support of Israel,” Koch said of Obama in a Jan. 7 interview with the Algemeiner, a Jewish publication. “It comes a little earlier than I thought it would.”

Rabbi Joe Potasnik, the executive vice president of the New York Board of Rabbis, said Koch told him his hero was Harry Truman, another Democratic Party leader unafraid of defying his base. "He admired independence," Potasnik recalled in an interview Friday.

Koch, who never married, held twin passions he guarded ferociously: the Jewish people and New York.

After the stone-throwing incident in 1990, Koch took the stone and blood-stained handkerchief to a frame shop, but the shop lost the stone and substituted a fake -- which Koch immediately spotted. He was placated only by a letter from Israeli Prime Minister Yitzhak Shamir, who praised him as “the first eminent American to be stoned in the Old City.” Instead of the stone, Koch framed Shamir’s letter along with a photo of his wound.

Koch’s tombstone is engraved with his name, his years as mayor, the Shema prayer, and the final words of Daniel Pearl, the Wall Street Journal reporter murdered in Pakistan on Feb. 1, 2002, the same date Koch died: "My father is Jewish. My mother is Jewish. I am Jewish."

His chosen burial place is a non-denominational churchyard at the corner of 155th Street and Amsterdam -- selected because he could not imagine spending eternity outside Manhattan.

To get the latest from HaaretzFollow @HaaretzomLike us on Facebook and get articles directly in your news feed