The president spent a good chunk of time attacking Jacob Frey ahead of his trip to the blue bastion of Minneapolis.

Minneapolis Mayor Jacob Frey was given a tour of the Capitol by Minnesota Sens. Amy Klobuchar and Tina Smith earlier this year.

President Donald Trump spent much of the summer viciously smearing Rep. Ilhan Omar (D-MN), at one point going as far as to amplify a lie about her “partying” on September 11. So it’s not a surprise that the Democratic mayor of Minneapolis, a city that comprises most of Omar’s district, isn’t a big fan.

It’s also not a big surprise that Omar’s district isn’t big on Trump. Omar received 78 percent of the vote in last year’s general election. She represents one of the nation’s largest Somali populations — one that Trump has demonized during trips to Minnesota. And yet on Thursday, Trump is holding a rally in downtown Minneapolis in hopes it’ll help him turn Minnesota red in 2020.

When Trump announced last month that he was coming to Minneapolis’ Target Center for a rally, Mayor Jacob Frey responded by saying “[o]ur entire city will stand not behind the President, but behind the communities and people who continue to make our city — and this country — great ... while there is no legal mechanism to prevent the president from visiting, his message of hatred will never be welcome in Minneapolis.”

Since then, however, the city of Minneapolis has found a couple legal mechanisms that at the very least have made Trump’s upcoming trip a little more difficult for him. But they also presented Trump with an opportunity to blast Frey as a “lightweight” and link him with Omar in tweets that served as a preview of the divide-and-conquer strategy Trump hopes put him over the top in Minnesota next year.

The Trump-Frey feud, briefly explained

Trump usually holds rallies in red areas that are broadly supportive of him, so scheduling one in the blue bastion of Minneapolis is an unusual move. Unsurprisingly, a coalition of progressive groups have already announced they plan to protest outside the Target Center. The scene outside the rally will likely be more confrontational than normal.

Policing those protests costs money. And the Trump campaign has a long, sordid history of stiffing cities that have tried to recoup security costs. As the Center for Public Integrity detailed earlier this year, Trump’s campaign committee “has not paid at least 10 bills — totaling more than $841,000 — sent to it by municipal governments to cover public safety costs associated with Trump campaign rallies.” Frey and other city officials are doing what they can in hopes that Minneapolis won’t become the next city on the list — much to the Trump campaign’s chagrin.

Ahead of the rally, Minneapolis officials communicated to AEG, the private company that manages the Target Center, that it will be responsible for the security costs associated with Trump’s rally. The city has estimated those costs will be north of a half-million dollars. AEG in turn pressed the Trump campaign to cover it. And the campaign — including Trump himself — is none too happy about it, citing a supposed double standard with how officials treated Presidents Obama and Clinton when they traveled to the city for political events.

During a news conference on Tuesday, Frey — who was elected mayor in 2017 — noted he can’t speak for how previous city governments conducted business. He also pointed out that security costs for a Trump rally dwarf those incurred when other presidents came to town.

Frey also directly responded to Trump with two viral tweets — one in which he wrote, “Yawn... Welcome to Minneapolis where we pay our bills, we govern with integrity, and we love all of our neighbors,” and another in which he suggested that the Trump campaign should help cover the cost of policing associated with its presence in the city.

Late Tuesday afternoon, Trump 2020 campaign manager Brad Parscale indicated that the rally is still on, despite the dispute over who will pay for security costs.

In a statement sent to Vox, Frey said he’s still working to make sure that taxpayers don’t ultimately get stuck with the bill.

“My position with respect to the operating costs remains unchanged: in keeping with our contract with AEG, taxpayers should be reimbursed for city-incurred costs resulting from the president’s visit,” Frey said. “In the days ahead, I will be meeting with city leadership and my council colleagues to decide upon the appropriate path forward.”

Trump is also making a big stink over the Minneapolis Police Department’s new uniform policy

The dispute over security costs isn’t the only controversy swirling around Trump’s Minneapolis rally. On Tuesday, Trump — drawing inspiration from Fox & Friends — blasted Frey for a new city policy preventing police officers from wearing their uniforms at political events if they aren’t on duty.

Frey has said that the policy change, which has the backing of the police chief, was under consideration before Trump announced his Minneapolis rally. Nonetheless, the Trump-supporting head of the police union, Bob Kroll, went on Fox & Friends on Tuesday and suggested there are political motives at play.

“Local politics here, it’s very left, and the mayor reacted very hostile the president’s announcement that he was coming, so this is our way to show our support without being in violation of the new policy,” Kroll said, referring to new “COPS FOR TRUMP” T-shirts the union is selling online.

Later Tuesday, Trump tweeted out video of Kroll’s Fox News interview.

Trump later explicitly promoted the shirts.

Kroll’s enthusiastic support for Trump is more the exception than the norm in Minneapolis. But Trump is hoping that there are enough supporters like him outstate to help him become the first Republican to carry Minnesota in a presidential election since Richard Nixon in 1972.

Trump seems to think he has a real shot at winning Minnesota. Polling indicates it’s not super likely.

Trump’s Minneapolis rally is shaping up to be a big deal. Mike and Laura Pence are also making the trip, as is Lara Trump.

You probably remember that Trump won Wisconsin, Michigan, and Pennsylvania in 2016. Somewhat lost to history — but not to Trump himself — is the fact that he almost won in Minnesota as well. And as he escalated his smears against Omar over the summer, Trump vowed to carry the state in 2020.

In another tweet posted Tuesday, Trump explicitly linked Frey and Omar, urging Minnesota voters to “dump” them and “Make America Great Again!”

As even Minnesota Democrats acknowledge, Minnesota has been trending red in presidential elections, and Trump only lost to Hillary Clinton by 1.5 percent there in 2016. But there are indications that might’ve been the high-water mark.

Morning Consult currently pegs his net approval rating as 11 points underwater in the state — a stark change from January 2017, when his net approval rating in Minnesota was three points positive. In 2018’s midterm cycle, Minnesota Republicans didn’t fare as poorly as, say, Republicans in California did, but they still lost two US Senate races, a gubernatorial race, and control of the state House — all by large margins.

Trump hopes his rally on Thursday — and the divide-and-conquer tweets he’s posting ahead of it — will help turn the tide. But Frey on Wednesday indicated he’s not particularly worried about the president’s Twitter abuse.

Omar, for her part, tweeted in response to Trump’s attacks on Frey that Minnesota “stands for peace, equity, and justice -- everything you are against.”

“While you spew hate, we will keep fighting for the America we deserve,” she added.

Thursday’s rally and the run up to it serves as a microcosm of the mud-fight strategy Trump hopes will be a winning one for him in 2020. Meanwhile, regardless of who ends up paying to police them, the protests happening outside the Target Center will illustrate the headwinds he and his divisive brand of politics face in trying to turn that hope into a reality.

The news moves fast. To stay updated, follow Aaron Rupar on Twitter, and read more of Vox’s policy and politics coverage.