From left: Donald Trump, Joe Torre, Michael Bloomberg, and Rudy Giuliani at Trump National Golf Club Westchester on July 14, 2008, in Briarcliff Manor, New York.

While serving as mayor of New York City, Michael Bloomberg appeared with Donald Trump to give advice to contestants at Gracie Mansion on The Apprentice in 2004 and to take a bite out of some hot dogs during a competition between two Celebrity Apprentice teams in 2008.

While Bloomberg has committed to running millions of dollars in anti-Trump ads ahead of the 2020 election, the relationship between the New Yorkers hasn’t always been so fraught. The two have attended charity events together and worked on projects, including a Bronx golf course. The relationship between the two deteriorated when Trump began running for president in 2015.

In the 2008 episode, Bloomberg — with Trump, Ivanka Trump, and Donald Trump Jr. in tow — walks up to a hot dog cart staffed by cast members of Celebrity Apprentice while dramatic music plays in the background.

“This is our great mayor,” Trump says, introducing Bloomberg to the first team of celebrities, which included former White House official Omarosa Manigault Newman, who were selling hot dogs as a part of a competition between men and women.

“As the number one frank-ophile in the city, I’m supposed to see if you can cut the mustard,” Bloomberg told the team of women before biting into a hot dog.

“I can’t tell whether these are better or worse than the one the men are selling until I have a hot dog with the men. But I can tell you without seeing the men — you look better,” he told the women.

Bloomberg's campaign has been under pressure since similar comments have reemerged in a report from ABC News, which reported that the former mayor and the company he founded have been sued by 17 women for sexual harassment and sexist remarks. Three of those cases specifically named Bloomberg.

In another moment on the show, as Bloomberg approaches the hot dog cart run by the men’s team, TV host Piers Morgan announces over a megaphone that the mayor of New York City was making an appearance at their stand.

“The question is: Is this the best hot dog? Or is the best hot dog sold by all those gorgeous women at the last stand?" Bloomberg said before taking another bite of a hot dog.

"When Mike was Mayor, he appeared on many television shows that were made in New York City, because the television industry creates good-paying, union jobs,” Bloomberg campaign spokesperson Julie Wood told BuzzFeed News. “He also relished the fact that part of being Mayor of New York is eating a lot of hot dogs in public."