Donald Trump. AP Coming off a huge win that all but guaranteed Donald Trump the Republican Party's nomination for president, the real-estate mogul tweeted early on Wednesday in defense of one of his Democratic rivals.

Vermont Sen. Bernie Sanders scored a surprising win in the Indiana Democratic primary on Tuesday, but he's still unlikely to beat his rival, Hillary Clinton, for the Democratic nomination.

Clinton, a former senator and secretary of state, still maintains a substantial lead in popular votes, pledged delegates, and superdelegates.

Trump, meanwhile, beat out his rivals in the Indiana Republican primary, prompting Texas Sen. Ted Cruz to drop out of the race. Ohio Gov. John Kasich remains, but he has no chance of winning the required number of delegates to secure him the nomination through state contests.

That means it's almost certain that Trump will face Clinton in the general election this fall. He's now taking aim at Clinton, whom he has nicknamed "Crooked Hillary," while defending Sanders.

"What a great evening we had. So interesting that Sanders beat Crooked Hillary," Trump tweeted on Wednesday morning, using his preferred moniker for Clinton. "The dysfunctional system is totally rigged against him!"

He continued in a subsequent tweet: "I would rather run against Crooked Hillary Clinton than Bernie Sanders and that will happen because the books are cooked against Bernie!"

Trump has ridden a wave of populist support to the Republican nomination, and Sanders has been pushing a similar message in focusing on a system that he says benefits society's billionaires at the expense of the middle class.