CHARLESTON, W.Va. — Don Blankenship, a former coal baron who went to prison for his role in a deadly mine disaster, was soundly defeated in the West Virginia Republican Senate primary on Tuesday, according to The Associated Press, after President Trump and other Republicans urged voters to reject him.

The state’s attorney general, Patrick Morrisey, captured the party’s nomination and is expected to mount an aggressive challenge this fall against Senator Joe Manchin III, a Democrat who is a top target of Republicans in their struggle to hang on to their one-seat Senate majority in the midterm elections in November.

Mr. Blankenship, who called himself “Trumpier Than Trump,” drew on elements of the president’s own populist playbook, including nativist attacks and charges of conspiracy leveled at the Obama-era Justice Department that prosecuted him for his role in the 2010 mine explosion, which killed 29 men.

But Washington Republican leaders badly wanted Mr. Blankenship to lose, with the Senate majority leader, Mitch McConnell, coordinating an effort to derail him. At Mr. McConnell’s urging, Mr. Trump on Monday warned “the great people of West Virginia” in a tweet that Mr. Blankenship could not win the general election against Senator Manchin.