ELLISVILLE, Miss. — A new front opened in the Republican Party’s bitter internal war on Wednesday when insurgent conservative Chris McDaniel announced that he will run against Sen. Roger Wicker (R-Miss.).

Like other fights that have erupted in the era of President Trump, the battle lines quickly started blurring. After declaring that the Republican Party had “lost its way,” McDaniel aligned himself with the party’s leader: Trump. But Trump is supporting Wicker.

In a blistering speech, McDaniel railed against the pillars of the Republican establishment, including Sens. Mitch McConnell (Ky.), John McCain (Ariz.) and Lindsey O. Graham (S.C) — and cast Wicker as a creature of a failed Washington system.

He also positioned himself as a social and cultural warrior, pledging a hard line on “illegal aliens” and promising to fight for the Mississippi state flag, which incorporates the Confederate battle flag, and reject compromise efforts with Democrats.

A 45-year-old state senator who nearly toppled Sen. Thad Cochran (R-Miss.) four years ago in one of the nastiest primary fights in recent history, McDaniel becomes the highest-profile Republican to challenge a sitting GOP senator this year.

“I’m not going up there to be a leadership lap dog,” said McDaniel. “I’m going to be Mississippi’s bulldog.”

His decision came after lengthy deliberations and with just a day to go until the filing deadline. And yet, it lacked total finality, as McDaniel opened the door to an alternative he has been considering: running for Cochran’s seat if Cochran steps down in the near future.

“You can’t foreclose any possibility in politics. It’s absolutely possible,” he said.

For the moment, at least, McDaniel’s main focus is Wicker, who has long girded for the possibility of a contested primary. With Trump and an experienced team of operatives on Wicker’s side, and a campaign war chest stocked with more than $4 million, defeating him in the June 5 primary is shaping up as a challenging endeavor.

Beyond the state’s borders, McDaniel’s campaign was shaping up as a rallying cry for an insurgent movement looking for a voice after it was dealt a major blow when embattled Republican Roy Moore lost a special election in Alabama late last year. The movement faces few other realistic opportunities to take down GOP incumbents.

“Americans are tired of the way that Washington operates, and McDaniel represents a new generation of Republicans who are committed to getting things done,” said Dan Eberhart, a wealthy oil industry executive and GOP donor who has been boosting McDaniel.

On the campus of Jones County Junior College here in McDaniel’s home town, he railed against Wicker and other lawmakers in Washington, whom he sought to cast as elitists he accused of being “more concerned about Mitch McConnell than they are you.” Repeatedly, he named McConnell, the Senate majority leader.

He also called for ending the 60-vote threshold for most legislation in the Senate, which McConnell supports. And he urged against working with Democrats: “We’re not here to compromise with those people — we’re here to defeat those people.”

He ticked through a list of scores Wicker has received from conservative groups, charging that Wicker is one of the “most liberal” Republicans in Congress.

McDaniel said the race would be a “referendum on illegal aliens” and he would not “support DACA under any circumstances,” using an acronym for an Obama-era program protecting hundreds of thousands of young undocumented immigrants.

The challenger said the people of Mississippi have “already spoken” about the state flag, and “until they speak again, we’re going to keep that flag.” In 2015, Wicker said the flag should “be put in a museum and replaced by one that is more unifying to all Mississippians.”

Wicker and his team responded to McDaniel’s launch.

“Gayle and I are looking forward to this campaign and sharing my record of successfully fighting to reduce job-killing regulations, confirm conservative judges, enact historic tax cuts, rebuild our military, and honor our veterans,” Wicker, 66, said in a statement, making no mention of McDaniel.

His campaign manager Justin Brasell, was more direct, singling out McDaniel’s support for Sen. Ted Cruz (R-Tex.) against Trump in the 2016 presidential primary and charging him with “attacking and insulting” Trump.

Ahead of McDaniel’s announcement, Wicker allies had been collecting examples of McDaniel questioning Trump’s conservative bona fides when he was on Cruz’s team.

Trump praised Wicker on Tuesday for helping pass the sweeping GOP tax bill last year and rolling back Obama-era regulations. “I am with him in his reelection all the way!” the president wrote on Twitter. On Wednesday, the president’s campaign said it was backing Wicker.

McDaniel sought to largely align himself with Trump in his announcement. “I’m going to go there to help him drain the swamp,” he said, using one of the president’s signature campaign themes.

Republicans are defending a 51-to-49 Senate majority in the midterm elections, and McDaniel’s far-right views have spurred nervousness among some in the party who believe a primary win by him could open the door for a Democratic upset, even in a ruby-red state.

The victory of Democrat Doug Jones over Moore in December’s special election in Alabama has put Republican officials on high alert. That win, coming in one of the most conservative states in the country, served notice that once-unthinkable upsets are possible.

“So Mississippi Roy Moore made it official. Testing out the ... narrow ‘never Trump,’ ‘anti-establishment’ combo platter candidacy,” Josh Holmes, a close McConnell confidant and former top aide, wrote on Twitter.

In 2014, McDaniel lost to Cochran in a hotly contested race that went to a runoff. He and his supporters haven’t forgotten about it, embracing the phrase “Remember Mississippi” as a battle cry.

Cochran’s term does not expire until January 2021. But the 80-year-old lawmaker has been battling health problems. Republicans close to the situation have predicted privately that Cochran could step down — or at least make an announcement about leaving — as soon as Congress finalizes a long-term government spending agreement.

Many expect that legislation to be completed by late March. Cochran has made no announcements about leaving Congress.

If he leaves, it would prompt a special election to be held Nov. 6, like the rest of the midterms. But such a contest would feature no party primaries and would go to a runoff if no candidate wins a majority.

Ahead of McDaniel’s announcement, dozens of people lined up outside, waiting to enter a 200-seat lecture hall to hear him speak. The line wrapped around the building and stretched into a nearby parking lot.

The stage inside was set with a massive, floor-to-ceiling American flag from the podium. The Mississippi state flag — the last in the nation containing the Confederate battle emblem — was also onstage.

Several people in line outside bought “Chris McDaniel for Senate” T-shirts, and Ryan Walters’s book “Remember Mississippi,” which describes McDaniel’s attempt to unseat Cochran, was also on sale. Many attendees said they were excited to hear McDaniel speak and were eager to be present for the announcement.

“History is being made today, and we’re here for it,” said Larry Eubanks, a native of Star, Mississippi.

Eubanks, a retired aviation mechanic, acknowledged Trump’s endorsement of Wicker and said that in general he stands with the president.

“But he’s surrounded by people who give him bad advice. I’m not happy about it, but I understand Chris is the best choice for Mississippi,” Eubanks said.

Wicker was appointed to the Senate at the end of 2007 to replace Republican Trent Lott. He won a 2008 election and was reelected by a wide margin in 2012.

Sullivan reported from Washington. Ganucheau is a reporter with Mississippi Today, a nonprofit news organization that covers the state.