Mayor Cory Booker of Newark, a close ally of President Obama in the upcoming election, slammed the president’s campaign Sunday for ads attacking Mitt Romney’s work for the private-equity firm Bain Capital.

Booker, who noted that many of his constituents are investors in or employees of New York-based financial firms, said it was wrong for the Obama campaign to portray the expected Republican nominee as someone who pursued profits by slashing jobs while serving as Bain’s chief executive.

“If you look at the totality of Bain Capital’s record, they’ve done a lot to support businesses, to grow businesses,” Booker said during an appearance on NBC’s “Meet the Press.” “And this, to me, I’m very uncomfortable with.”

The mayor later released a YouTube video in which he tried to clarify his comments and emphasize his support for the president.

Booker’s remarks earlier Sunday were aimed at a television advertisement introduced by the Obama campaign last week that sharply criticized Romney’s record at Bain — a line of attack seen as central in an election whose outcome is expected to be shaped by voters’ economic concerns.

The advertisement intersperses somber interviews with former steelworkers at a plant once owned by Bain and upbeat footage of Romney on the campaign trail. One of the workers calls Romney a “job destroyer.”

Booker’s criticism of the advertisement could help Romney’s campaign as it seeks to fend off attacks related to his record at a firm that held investments in a variety of industries.

I have to just say, from a very personal level, I’m not about to sit here and indict private equity,” Booker said. “I live in a state where pension funds, unions and other people are investing in companies like Bain Capital.”

But Booker also took aim at reports that Romney supporters had planned to make advertisements reviving Obama’s connection to the Rev. Jeremiah Wright, a controversial minister in Chicago.

“This kind of stuff is nauseating to me on both sides,” Booker said. “It’s nauseating to the American public. Enough is enough. Stop attacking private equity. Stop attacking Jeremiah Wright.”

Romney criticized the Wright ad before it was introduced.

Booker’s criticism of the Obama ad may deliver a particular sting because of his close ties to Obama and prominent role in the campaign.