NEW YORK — City Council Speaker Christine Quinn and Public Advocate Bill de Blasio, once the most bitter of foes, stood side by side in front of City Hall on Tuesday as she backed him for mayor, sealing the endorsement with a hearty hug.

The scene was unimaginable for much of the year, which de Blasio spent relentlessly attacking Quinn, the former Democratic front-runner, for her close ties to independent Mayor Michael Bloomberg and for the key role she played in allowing Bloomberg to seek a third consecutive term.

But the searing barbs and accusations have been set aside now that the Democratic primary has been settled and the party unifies around its nominee, de Blasio, who did his part by downplaying the issue by which he had defined Quinn.

"We had a difference on term limits, and that's fine," de Blasio said.

Quinn's help allowed Bloomberg to change the city charter so he could run again in 2009. Voters repealed that change the following year.

De Blasio became the Democratic nominee Monday when the primary's runner-up, ex-comptroller Bill Thompson, bowed out instead of waiting to see if a final vote tally would reveal de Blasio's support fell below the 40 percent mark needed to avoid an automatic runoff.

Quinn, who was bidding to become the city's first female and first openly gay mayor, was atop the polls for much of the campaign only to plummet to third in last week's primary.

She offered a full-throated endorsement of de Blasio, saying she was "proud" to support him and urged her supporters, including several unions, to do the same. She reneged on her frequent campaign attack line that de Blasio wasn't to be trusted.

"I trust Bill de Blasio, and I believe he will be a terrific mayor for the City of New York," she said.

De Blasio will face Republican nominee Joe Lhota and independent candidates in the Nov. 5 general election.

The first poll since the primary showed de Blasio with a sizeable lead over Lhota. According to the NBC 4 New York/Wall Street Journal/Marist poll, published on The Wall Street Journal's website, 65 percent of likely voters support de Blasio, while 22 percent pick Lhota.

Lhota, a former head of the region's transportation agency and a deputy to former mayor Rudolph Giuliani, has slammed de Blasio's campaign theme of "the tale of two cities" — which de Blasio uses to discuss income inequality — as class warfare. Lhota aimed to prove his own inclusiveness on Tuesday by trying to make inroads on traditionally Democratic turf.

He met in the morning with the leaders of the city's largest municipal employees union, District Council 37, which later endorsed de Blasio, and met with civil rights leader the Rev. Al Sharpton in the evening.

The two spoke publicly after their 25-minute meeting, which Sharpton described as "cordial and candid."

"I've always believed you can disagree without being disagreeable," said Sharpton, who didn't make an endorsement.

Both declined to get into specifics, but Sharpton said they discussed education and the police stop-and-frisk tactic, among other issues.

Lhota is an ardent supporter of stop-and-frisk, which allows police officers to stop people deemed to be acting suspiciously, saying it helps drive down crime. A federal judge ruled it discriminates against minorities and ordered a monitor to oversee changes.

Lhota agreed to attend one of Sharpton's National Action Network public forums.

"This is the first of many discussions I hope to have with him," Lhota said.