Rep. Thomas Massie, a Kentucky Republican who has been one of President Donald Trump’s most persistent critics in Congress, faces a primary challenge Tuesday from Ed Gallrein, a farmer and former Navy SEAL who entered the race at Trump’s urging. The contest in Kentucky’s 4th Congressional District is the marquee race in the state’s primary elections, representing the latest effort by Trump to purge Republicans he views as disloyal.

Massie, first elected in 2012, is seeking an eighth full term. He has built a reputation as a libertarian-leaning Republican who has defied party leadership and the White House on several fronts. He opposed Trump’s signature tax package in 2017, voted against the war with Iran, and has been a leader in Congress on efforts to release the files of convicted sex offender Jeffrey Epstein.

Gallrein, a farmer and former Navy SEAL, entered the race after Trump encouraged him to challenge the incumbent. He has campaigned as a reliable supporter of the president’s agenda, arguing that Massie’s independent voting record has weakened his standing within the Republican conference and made him less effective at advancing GOP priorities. Trump has openly backed Gallrein, making the race a direct test of the president’s endorsement power in a district that has reliably voted Republican.

The contest is part of a broader pattern this primary season in which Trump has targeted House Republicans who have crossed him. Massie has been among the most prominent targets given his willingness to vote against Trump’s top legislative priorities and to publicly criticize the president.

Beyond the 4th District, Kentucky voters on Tuesday will also select nominees for U.S. Senate, five other U.S. House seats, and the state General Assembly. In Louisville, the Democratic primary for mayor will narrow a crowded field.