Josh Kraft, the son of the New England Patriots’ owner, announced Thursday that he is ending his bid to unseat Boston Mayor Michelle Wu, days after both candidates advanced to the November ballot.

Kraft made the decision public on WCVB-TV and in a letter to supporters made available to The Associated Press, saying the campaign had never been about him or Wu and that he did not want to contribute to political divisiveness. In the preliminary held Tuesday, Wu received roughly 72% of the vote to Kraft’s 23%, a wide margin that underscored her popularity heading into the general election. As of the end of August, Kraft had outspent Wu by about $5.5 million to $1.1 million, a gap driven largely by more than $5 million in loans he made to his own campaign.

Kraft said he would redirect money he had planned to use in the race toward local initiatives, announcing a $3 million investment aimed at workforce training for formerly incarcerated people and efforts to address homelessness and drug addiction in the Mass and Cass neighborhood. He said the funds would be a combination of money already committed to his campaign and additional dollars.

Wu, Boston’s first female and first Asian mayor, released an email statement saying she respected Kraft’s decision and thanked him for caring deeply about the city. She said her campaign would continue engaging community members about public safety, housing and other issues affecting residents.

The race unfolded against heightened tensions between the city and the federal government over immigration enforcement. Federal immigration authorities launched a new operation in Boston the week of the preliminary election after a surge in arrests earlier in the year, and the U.S. Department of Justice last week sued Wu, the city and the police department over sanctuary policies that the Justice Department says interfere with immigration enforcement. Wu has characterized the federal actions as an attack on cities and defended Boston’s status as a welcoming place for immigrants.

Kraft framed his withdrawal as a move toward unity at a time he said the nation needs to come together despite differences. He identified workforce development, criminal re-entry programs and addressing substance use and homelessness as priorities he plans to support outside the campaign.

It remained unclear whether another candidate could replace Kraft on the Nov. 4 ballot. Kraft’s exit leaves Wu without the millionaire self-funded challenger who had significantly increased spending in the race but failed to gain comparable voter support in the preliminary election.