Buffalo’s mayor and the Erie County executive – Democrats from different camps of the party – papered over any lingering disputes Monday so the county executive could endorse the mayor for re-election and the mayor could accept.

“Mayor, it is my pleasure to support you, and I look forward to working with you in the years to come,” County Executive Mark C. Poloncarz said at their news conference in front of Kleinhans Music Hall.

“The county executive is the highest-ranking elected official in Erie County,” Mayor Byron W. Brown responded. “I am honored to have earned his endorsement.”

At the suggestion of an aide, they took a light-hearted stroll along the music hall’s reflecting pool, and photographers captured their best-buds moment.

It wasn’t always this way.

As titans within the perpetually skirmishing Erie County Democratic Party, Brown and Poloncarz developed a healthy skepticism for each other.

For years, Poloncarz enlisted with party headquarters and then-Chairman Leonard R. Lenihan. Brown, meanwhile, went through a series of spats with Lenihan and grew indifferent, or worse, toward him.

The feud loomed large in any discussion about county politics and its largest political party.

Brown could turn his back on party headquarters because he had his own organization, run by his political sleuth and deputy mayor, Steven M. Casey. Casey regularly undermined Lenihan, and sometimes his associates, too.

In 2010, for example, Casey called on some well-placed county lawmakers to fracture the County Legislature’s Democratic majority and create a ruling coalition loyal to the Republican county executive at the time, Chris Collins. The coalition routed Lenihan’s picks from the Legislature’s staff and gave Casey patronage jobs to fill. The coalition also helped Collins marginalize his rival, Poloncarz, then the county comptroller.

Later, Poloncarz calculated that Buffalo’s dwindling population no longer allowed the city such a large slice of the county’s sales tax revenue. Buffalo, Poloncarz found, would lose up to $3 million a year under a formula laid out decades ago.

Brown was smarting soon after.

“He said later it was no big deal,” the mayor told The Buffalo News in June 2011. “I disagree. To me, $3 million out of the city’s coffers is important.”

When Poloncarz ran for county executive, challenging Collins in the Republican’s bid for a second term, Casey’s operatives were passing Conservative Party designating petitions for Collins. Outwardly, Brown intended to remain neutral. But high-ranking Democrats in Albany were fostering peace in always divided Erie County.

With Lenihan being forced out and Gov. Andrew M. Cuomo watching, Brown agreed to endorse Poloncarz for county executive. He did so during a rally for the party faithful.

“It was the most unusual endorsement rally I have ever been to,” said Gregory Olma, a former county lawmaker who is an elected member of the county Democratic Party’s executive committee and moves between the factions. He said the rally, which was supposed to be for Poloncarz, got around to Poloncarz only toward the tail end. Cuomo sat between the two.

In a continuing sign of discord, the City Hall machinery this year has run candidates against two Legislature incumbents linked to party headquarters and loyal to Poloncarz: County Legislature Chairwoman Betty Jean Grant and Legislator Timothy Hogues, both of Buffalo.

Naturally, Grant did not welcome news that Poloncarz had endorsed the mayor.

“We have been Mark’s biggest supporters and allies in the Legislature,” Grant said. “… We are fighting for our political futures, and instead he endorses an individual who is supporting our opponents. By that I am disheartened.”

After facing City Hall-backed opponents in other election years, she favors the mayor’s opponent, former FBI agent and NBA executive Bernard Tolbert, in the crucial Democratic primary.

This time around, Brown is the endorsed candidate under the leadership of Jeremy Zellner, Lenihan’s replacement. Staying on the sidelines would have distinguished Poloncarz, and not in a good way, with state party leaders who want peace here, especially after Brown endorsed him in 2011.

Brown and Poloncarz said they have worked well together since Poloncarz was sworn in as county executive in January 2012. Poloncarz, who as county executive has a seat on the state-appointed board that oversees Buffalo’s finances, voted to relax the control board to “advisory status” because Buffalo’s bottom line has strengthened during Brown’s first two terms.

Important to Poloncarz: Brown accepted creation of a nonprofit “land bank” that could help rescue distressed properties in Buffalo and Erie County. Brown in previous years opposed a land bank in Buffalo that was not fully controlled by the city. Further, the land bank was backed by Sam Hoyt, a Brown rival during Hoyt’s terms as an assemblyman from Buffalo.

“Not only am I here to endorse Mayor Brown, but as a City of Buffalo resident, I will be voting for him this fall,” Poloncarz told reporters Monday.

He went on to say that while he likes Tolbert, “I don’t think he has a cohesive message as to why he wants to be mayor.”

Said Brown: “As the county executive said, we have built a very strong relationship to create progress for Buffalo and the region.”

Tolbert announced Monday that he will host a show on radio station WUFO (1080 AM) on Tuesdays and Fridays during August. He will bring in guests to discuss with him the issues his campaign has highlighted, including crime, substandard education and economic decline. He’s also running stories about his candidacy on a website: www.tolbert2013.com.