WATCH: NYC Mayor Zohran Mamdani gives inaugural speech after taking oath of office

NEW YORK (AP) — Zohran Mamdani became mayor of New York City on Thursday, taking over one of the most unrelenting jobs in American politics with a promise to transform government on behalf of the city's striving, struggling working class.

Watch Mamdani's ceremonial swearing-in and inaugural speech in the video player above.

Mamdani, a Democrat, was sworn in at a decommissioned subway station below City Hall just after midnight, placing his hand on a Quran as he took his oath as the city's first Muslim mayor.

READ MORE: Zohran Mamdani officially sworn in as New York City's mayor on a Quran full of symbolism

After working part of the night in his new office, Mamdani then returned to City Hall in a taxi cab around midday Thursday for a grander public inauguration where U.S. Sen. Bernie Sanders, one of the mayor's political heroes, administered the oath for a second time.

"Beginning today, we will govern expansively and audaciously. We may not always succeed, but never will we be accused of lacking the courage to try," Mamdani told a cheering crowd.

"To those who insist that the era of big government is over, hear me when I say this: No longer will City Hall hesitate to use its power to improve New Yorkers' lives," he said.

Throngs turned out in the frigid cold for an inauguration viewing party just south of City Hall on a stretch of Broadway known as the "Canyon of Heroes," famous for its ticker-tape parades.

Taxing the rich

Throughout the ceremony, Mamdani and other speakers hit on the theme that carried him to victory in the election: Devotion to using government power to lift up the millions of people who struggle with the city's high cost of living.

"I was elected as a democratic socialist and I will govern as a democratic socialist," Mamdani said. "I will not abandon my principles for fear of being deemed 'radical.'"

Before administering the oath, Sanders told the crowd that most of the things Mamdani wants to do — including raising taxes on the rich — aren't radical at all.

"In the richest country in the history of the world, making sure that people can live in affordable housing is not radical," he told the crowd. "It is the right and decent thing to do."

In opening remarks, U.S. Rep. Alexandria Ocasio-Cortez said Mamdani would be a mayor dedicated to the working class.

"It is the people of New York who have chosen historic, ambitious leadership in response to untenable and unprecedented times. New York, we have chosen courage over fear. We have chosen prosperity for the many over spoils for the few," she said.

Mamdani was accompanied on the stage by his wife, Rama Duwaji. The previous mayor, Eric Adams, was in attendance, sitting near another former mayor, Bill de Blasio.

Actor Mandy Patinkin, who recently hosted Mamdani to celebrate Hannukah, sang "Over the Rainbow" with children from an elementary school chorus. The invocation was given by Imam Khalid Latif, the director of the Islamic Center of New York City. Poet Cornelius Eady read an original poem called "Proof."

In addition to being the city's first Muslim mayor, Mamdani is also its first of South Asian descent and the first to be born in Africa. At 34, Mamdani is also the city's youngest mayor in generations.

Free child care and bus rides

In a campaign that helped make "affordability" a buzzword across the political spectrum, Mamdani ran on a focused platform that included promises of free child care, free buses, a rent freeze for about 1 million households and a pilot of city-run grocery stores.

Mamdani insisted in his inaugural address that he will not squander his opportunity to implement those policies.

"A moment like this comes rarely. Seldom do we hold such an opportunity to transform and reinvent. Rarer still is it the people themselves whose hands are on the levers of change. And yet we know that too often in our past, moments of great possibility have been promptly surrendered to small imagination and smaller ambition," he said.

But he will also have to face other responsibilities: handling trash and snow and rats, while getting blamed for subway delays and potholes.

Mamdani was born in Kampala, Uganda, the son of filmmaker Mira Nair and Mahmood Mamdani, an academic and author. His family moved to New York City when he was 7, with Mamdani growing up in a post-9/11 city where Muslims didn't always feel welcome. He became an American citizen in 2018.

He worked on political campaigns for Democratic candidates in the city before he sought public office himself, winning a state Assembly seat in 2020 to represent a section of Queens.

WATCH: Photographer reflects on capturing Zohran Mamdani's improbable rise to prominence

Mamdani and his wife, Rama Duwaji, are departing their one-bedroom, rent stabilized apartment in the outer-borough to take up residence in the stately mayoral residence in Manhattan.

Mamdani inherits a city on the upswing, after years of slow recovery from the COVID-19 pandemic. Violent crime has dropped to pre-pandemic lows. Tourists are back. Unemployment, which soared during the pandemic years, is also back to pre-COVID levels.

Yet deep concerns remain about high prices and rising rents in the city.

He'll also have to deal with Republican President Donald Trump.

During the mayoral race, Trump threatened to withhold federal funding from the city if Mamdani won and mused about sending National Guard troops to the city.

But Trump surprised supporters and foes alike by inviting the Democrat to the White House for what ended up being a cordial meeting in November.

"I want him to do a great job and will help him do a great job," Trump said.

The progressives take on Trump

Still, tensions between the two leaders are almost certain to resurface, given their deep policy disagreements, particularly over immigration.

Several speakers at Thursday's inauguration criticized the Trump administration's move to deport more immigrants and expressed hope that Mamdani's City Hall would be an ally to those the president has targeted.

Mamdani also faces skepticism and opposition from some members of the city's Jewish community over his criticisms of Israel's government.

A free press is a cornerstone of a healthy democracy.

Support trusted journalism and civil dialogue.