Gov. Andrew Cuomo refused to get involved in the fractious Democratic primary for the New York City mayoralty — until he decided to end it.

On Monday, the governor endorsed Public Advocate Bill de Blasio and praised former city Comptroller William Thompson, who said he wouldn't push to force an Oct. 1 runoff against de Blasio. A runoff is required by city law if no primary candidate gains at least 40 percent of the popular vote.

Thompson's move seemed to become more inevitable by the day as former supporters shifted their fealty to de Blasio and the city's Board of Elections sputtered through the process of recanvassing voting machines and opening paper ballots. In early results, de Blasio's share of last week's vote ticked up slightly.

The governor has been sparing with his electoral endorsements, and conspicuously avoided this year's city elections, particularly as the redemption candidacies of Eliot Spitzer and Anthony Weiner created a media circus. (Neither was successful at the polls.) Cuomo had ties to both Republican and Democratic candidates.

Now, though, he can claim a role as peacemaker and convener. While he said he didn't influence Thompson's decision, people familiar with talks over the weekend said that the governor was clearly a "facilitator," as he and other Democrats sensed that continued division would only benefit Republican candidate Joe Lhota, a former Cuomo appointee.

"The governor is the political leader of the Democrats in this state. It's his job to make sure conflicts are avoided whenever possible," said Hank Sheinkopf, a New York City-based political consultant. "The beneficiary will ultimately be himself. He wants to have a united Democratic Party when he runs for re-election next year."

It was also a very public display of Cuomo placing himself alongside de Blasio. While Democrats have not controlled City Hall for 20 years, they have a vast registration advantage over Republicans and control every other city and statewide office. The Big Apple's mayor has a major bully pulpit, and is arguably the second most dominant elective figure on the state's political scene.

At the news conference on the steps of City Hall, Cuomo emphasized his long history with de Blasio: The two men worked together at the federal Department of Housing and Urban Development during the Clinton administration "many wrinkles and many gray hairs ago," when they faced a Republican-controlled Congress skeptical of HUD's ability to carry out its mission.

"At the end of the day, the voters acted, and they acted smartly," the governor said. "We are all New Yorkers, we are all together and we are one. ... It is my honor to support him, it is my honor to celebrate the unity."

Thompson garnered a little more than 26 percent of the vote. City Council Speaker Christine Quinn, who placed third with 15.5 percent, was not present for the event.

A column in Monday's New York Post suggested possible tension between Cuomo and de Blasio, despite the public smiles. De Blasio promised during his campaign to raise taxes on the wealthy to support expanded pre-kindergarten programs, something that contradicts Cuomo's stated desire to cut taxes.

Cuomo's remarks were general and he did not speak ill of Lhota. The governor lauded de Blasio for running a campaign in "the great, progressive Democratic traditions that made this the greatest city."

De Blasio heaped praise on both Thompson and Cuomo. "It will be my honor, if the people choose me, to turn to Bill regularly," de Blasio said of his former opponent. "The governor has had a profound impact on my life. What he has done for this state is nothing short of miraculous."