After an election night of great drama as the two candidates raced neck-and-neck in the polls, there were in the end only 3 percentage points between them.
The result, a near mirror-image of Mr Giuliani's 2 percentage-point loss to Mr Dinkins in 1989, underscored that New York is in fact two cities, the better-off and the badly- off.
The middle-class whites, angry and fed up with the shootings, the drugs and the filth on the city's streets, voted for Mr Giuliani. The poorer blacks and Hispanics clung to a belief that Mr Dinkins' well-advertised compassion and consensus politics would somehow, some day, better their lot - even though the mayor had given them scant evidence of this during the last four years.
Blacks complained bitterly about their loss, which included Mr Dinkins being the only African- American mayor of a big city not to win a second term. They accused whites of not giving Mr Dinkins a fair chance to show what he could do. If Mr Dinkins had been white he would have been re-elected, no problem, they said. The prospects for racial harmony were not good, they forecast. 'It means we can't put race behind us,' said one.
It will take several days for the official count to be posted, but it appeared that something over half the city's 3.3 million registered voters turned out, below the 60 per cent level of 1989.
The key group of Democrats who had crossed over to Mr Giuliani and given him victory sought to explain themselves in the cold light of the morning. 'I've always been a Democrat but I voted for Giuliani because I've had the dirt and crime up to my neck,' said Maria, a well- dressed middle-aged woman from Greenwich Village.
In his gracious concession speech Mr Dinkins, an old-style clubhouse Democrat and a New Deal liberal, urged his crushed supporters to reach out and help Mr Giuliani, but they just booed.
Whether Mr Giuliani will keep his pledge to run a 'fusion' administration of Republicans and Democrats; whether he can, as he promised, reach out to all ethnic, religious and racial groups, bring back jobs, cut crime and prevent the kind of racial tensions that have plagued other big cities such as Los Angeles, remains to be seen.
A tavern owner's son and one of the nation's fiercest prosecutors, Mr Giuliani must complete his transformation, only hinted at during the campaign, from a law-and-order friend of the police and firefighters to the mayor of a multicultural Democratic city trying to survive the hardships of the Nineties.
Running the New York prosecutor's office, chasing Wall Street crooks and tackling political corruption and the Mafia during the freewheeling banditry of the Eighties turned Mr Giuliani into a household name but hardly prepared him for running the city on the edge of financial upheaval.
Like other Republican American mayors, Mr Giuliani favours reducing government, encouraging competition and putting a greater burden on the poor to take care of themselves. He must make cuts in city hall and in services if he is to cope with an immediate budget shortfall of dollars 750m ( pounds 504m). Next year, a dollars 2bn deficit is forecast, putting further strains on Mr Giuliani's ability to meet the demands of the city's powerful unions.
As he set off yesterday on a 'unity' tour of the city's five boroughs, there were some who recalled the problems that plagued the last Republican mayor, John Lindsay, whose administration in the mid-60s was crippled by dustmen's strike and two teachers' strikes.
(Photograph omitted)Reuse content