He was not on the ballot, but former President Trump was one of the winners in Maryland’s Republican primary for governor.

So was the Democratic Governors Association, whose seven-figure investment in the GOP contest appeared to pay off.

The candidate Trump was backing in the Republican primary, state Delegate Dan Cox, captured the party’s nomination in the race to succeed term-limited GOP Gov. Larry Hogan in blue state Maryland.

Cox defeated Kelly Schulz, a former state lawmaker who had served as Maryland’s secretary of labor (2015-2019) and secretary of commerce (2019–2022) in the Hogan administration. Schulz had Hogan’s backing, and the race, to a degree, turned into a proxy war between the former president and the incumbent governor. Two other long-shot candidates combined captured less than 5% of the total vote.

HEAD TO THE FOX NEWS ELECTIONS CENTER FOR THE LATEST PRIMARY RESULTS 

Maryland GOP governor candidate Dan Cox

Delegate Dan Cox talks to reporters while campaigning for the Republican nomination for governor in Annapolis, Maryland, June 30, 2022. (AP Photo/Brian Witte, File)

Trump repeatedly praised Cox and took aim at Hogan, who has long been a vocal GOP critic of the former president.

"Dan will end Larry Hogan’s terrible RINO reign by defeating his ‘Never Trump’ successor," the former president argued in the days leading up to the primary. The term "RINO" stands for "Republican in name only."

When asked about the impact of Trump’s endorsement and support, Cox told reporters on Tuesday night that "we clearly were blessed by it."

Hogan, ahead of the primary, was heavily critical of Cox, arguing in an interview last week with Fox News that the candidate was a "crazy guy" who has "no business whatsoever running for governor and has no ability to win a race."

The Democratic Governors Association, which is hungry to flip the Maryland governor’s office from red to blue in November, agreed with Hogan.

That is why the DGA, the top organization helping Democratic candidates in gubernatorial races, spent nearly $2 million to run ads boosting Cox ahead of the primary. Democrats viewed Cox, a conservative lawmaker who supports Trump’s repeated unproven claims that his 2020 election loss to now President Biden was due to "massive voter fraud," and who takes a hard line in opposing abortion, as a weaker candidate than Schulz in the general election.

Kelly Schulz is running for Maryland governor

Kelly Schulz, a Republican candidate for governor in Maryland, in a campaign video. (Kelly Schulz gubernatorial campaign)

Cox’s victory in the Maryland primary came three weeks after conservative state Sen. Darren Bailey’s convincing win in the Illinois GOP gubernatorial primary. 

DEMOCRATS MEDDLE IN MARYLAND'S GOP GUBERNATORIAL PRIMARY

Bailey, who similar to Cox is a strong supporter of Trump’s constant re-litigation of the 2020 election, was also endorsed and supported by the former president. Bailey was also supported by the DGA and Democratic Gov. J.B. Pritzker, who, combined, spent tens of millions of dollars to boost Bailey over moderate Republican Mayor Richard Irvin of Aurora, a city in metropolitan Chicago.

Donald Trump campaigning for Illinois candidate

Gubernatorial candidate Darren Bailey greets former President Donald Trump during a rally at the Adams County Fairgrounds on June 25, 2022, in Mendon, Illinois. (Michael B. Thomas/Getty Images, File)

There was a similar dynamic in Pennsylvania's May GOP gubernatorial primary, where the Trump-endorsed candidate -- conservative state Sen. Doug Mastriano – was also boosted by the DGA.

The DGA was quick to blast Cox on Tuesday night after the AP projected his victory in the Republican primary, describing him as a "Q-Anon conspiracy theorist."

"We can’t let Dan Cox turn Maryland into MAGAland, which is why the DGA has been holding him accountable for weeks and will continue to ensure we defeat him and his dangerous agenda in November," DGA executive director Noam Lee argued. 

The earlier victories by Bailey and Mastriano, and the win by Cox on Tuesday, give Trump some bragging rights after the former president suffered setbacks in other high-profile Republican gubernatorial showdowns this primary season. A year and a half removed from the White House, Trump remains the most popular and influential politician in the GOP as he continues to play a kingmaker’s role in party politics and repeatedly teases a 2024 White House run.

CLICK HERE TO GET THE FOX NEWS APP

"Trump has had a mixed bag when it comes to gubernatorial races in open primaries. Obviously, he had more success in Maryland, pushing Cox over the finish line," a veteran Republican strategist who asked to remain anonymous to speak more freely told Fox News. 

"Ultimately his record when it comes to going after incumbent Republican governors is much less impressive," the strategist added. "I think that just goes to show you the dynamic that exists between an open primary and primary where you have an incumbent governor."