Donald J. Trump became the presumptive Republican presidential nominee on Tuesday with a landslide win in Indiana that drove his principal opponent, Senator Ted Cruz, from the race and cleared the way for the polarizing, populist outsider to take control of the party.

After months of sneering dismissals and expensive but impotent attacks from Republicans fearful of his candidacy, Mr. Trump is now positioned to clinch the required number of delegates for the nomination by the last day of voting on June 7. Facing only a feeble challenge from Gov. John Kasich of Ohio, Mr. Trump is all but certain to roll into the Republican convention in July with the party establishment’s official but uneasy embrace.

In the Democratic contest, Senator Bernie Sanders rebounded from a string of defeats to prevail in Indiana over Hillary Clinton, who largely abandoned the state after polls showed her faring poorly with the predominantly white electorate. But the outcome was not expected to significantly change Mrs. Clinton’s sizable lead in delegates needed to win the Democratic nomination.

Mr. Trump’s victory was an extraordinary moment in American political history: He is now on course to be the first standard-bearer of a party since Dwight D. Eisenhower, a five-star general and the commander of Allied Forces in Europe during World War II, who had not served in elected office.