The 1989 New York City mayoral election was held on Tuesday, November 7. Incumbent Mayor Ed Koch, who had served since 1978, ran for an unprecedented fourth term in office but was defeated in the Democratic Party primary by Manhattan Borough President David Dinkins. Dinkins went on to narrowly defeat U.S. Attorney for the Southern District of New York Rudy Giuliani, the candidate of both the Republican Party and Liberal Party of New York. Dinkins won with 50.42% of the vote to Giuliani's 47.84%.