Former Maryland Gov. Robert Ehrlich won the GOP gubernatorial primary Tuesday to set up a rematch with Gov. Martin O'Malley (D) in November.

Ehrlich crushed investor Brian Murphy by some 60 points. With only 20 precincts reporting, the Associated Press declared him the winner.

He lost to O’Malley in 2006.

Murphy gained notoriety when he was endorsed by former Alaska Gov. Sarah Palin. But in a bizarre twist, Sen. John McCain (R-Ariz.) on Monday endorsed Ehrlich, pitting the 2008 GOP presidential ticket on opposite sides in this primary.

The Maryland governor’s primary was one of the first in which McCain and Palin found themselves supporting opposing candidates. Palin endorsed McCain in his March for reelection. He handily won his August primary contest.

Murphy ran to the right of Ehrlich but wasn't able to gain traction.