“You could have gotten all of his supporters into a phone booth,” Mr. de Blasio joked recently.

But their bond, even then, appeared to many as one of political convenience.

“Friends might be a stretch,” said John Marino, another emissary deployed by Mr. Cuomo in that 2002 weekend when he withdrew from the governor’s race. “They both respected each other. There was no question Andrew respected what Bill thought, and vice versa.”

They climbed the ladder of New York politics in parallel steps. Mr. de Blasio to the City Council in 2001; Mr. Cuomo to state attorney general in 2006; Mr. de Blasio to city public advocate in 2009; Mr. Cuomo to governor in 2010; Mr. de Blasio to mayor in 2013.

There was mutual respect, too. Matt Wing, who worked for Mr. de Blasio as public advocate and later for Mr. Cuomo as governor, still vividly recalls watching Mr. Cuomo’s first budget address in 2011 over junk food with Mr. de Blasio.

“I remember Bill and I both being impressed and more than a little inspired,” Mr. Wing recalled.

Weeks after Mr. de Blasio’s inauguration on Jan. 1, 2014, Mr. Cuomo proclaimed, “I don’t have a better political friend than Bill de Blasio.”

But the problems to come were already apparent.

On the day that Mr. de Blasio’s last Democratic opponent bowed out in September 2013 (Mr. Cuomo had not endorsed his friend until then), aides to Mr. Cuomo and Mr. de Blasio nearly came to blows over the speaking order at a unity rally. It was meant to be Mr. de Blasio’s day of triumph; Mr. Cuomo spoke longer.

The battle to be the alpha male of New York politics had only just begun.

V for Vendetta

This is hardly Andrew Cuomo’s first feud. He has quarreled with a parade of politicians in the last decade: Eliot L. Spitzer, David A. Paterson, Eric T. Schneiderman, Michael R. Bloomberg and Thomas P. DiNapoli. While he was HUD secretary in the 1990s, Mr. Cuomo’s clash with the department’s inspector general was legendary. Before that, he tossed sharp elbows professionally for his father in the 1980s.