NEW YORK -- Bill de Blasio was sworn in as the 109th mayor of New York City on Wednesday, becoming the first Democrat to occupy City Hall in nearly two decades while vowing to pursue a sweeping liberal agenda for the largest U.S. city.

De Blasio took the oath of office moments after midnight in front of his modest Brooklyn home and hour later was sworn in on a far grander scale on the steps of City Hall, taking the oath again as administered by former President Bill Clinton.

"We are called to put an end to economic and social inequalities that threaten to put an end to the city that we love," de Blasio told the crowd.

The new mayor was elected two months ago by a record margin on the promise of being a sharp break from billionaire Michael Bloomberg. Bloomberg leaves office after 12 years that reshaped New York, making it one of the nation's safest and most prosperous big cities but also one that has become increasingly divided between the very rich and the working class.

De Blasio, 52, was joined in the first minutes of 2014 by his wife, Chirlane McCray, and their two teenage children, a close-knit interracial family who played a central role in his campaign and to some are a further symbol of a new era after the data-driven, largely impersonal Bloomberg years.

"To everyone, this is the beginning of a road we will travel together," de Blasio said after taking the midnight oath.

Later, on the steps of City Hall, he thanked the city and Italy, where he has family roots. He also briefly spoke Spanish in a gesture to the city's large population from the Dominican Republic, Mexico and elsewhere.

The inauguration was a joyous day for city Democrats, who outnumber Republicans in the city by a margin 6-to-1 but have been shut out of power since David Dinkins left office on New Year's Eve 1993.

The new mayor worked for the Clinton administration and helped manage former Secretary of State Hillary Rodham Clinton's successful 2000 Senate campaign.

De Blasio, an unabashed progressive who touts his Brooklyn roots, takes office at a crucial juncture for the city of 8.4 million people.

As New York sets record lows for crime and highs for tourism, and as the nearly completed One World Trade Center rises above the Manhattan skyline, symbolizing the city's comeback from the Sept. 11, 2001, terror attacks, many New Yorkers have felt left behind during the city's renaissance.

De Blasio reached out to those he contended were left behind by the often Manhattan-centric Bloomberg administration, and he called for a tax increase on the wealthy to pay for universal pre-kindergarten.

He also pledged to improve economic opportunities in minority and working-class neighbourhoods and decried alleged abuses under the police department's stop-and-frisk policy. He and his new police commissioner, William Bratton, have pledged to moderate the use of the tactic, which supporters say drives down crime but critics claim unfairly singles out blacks and Hispanics.