Hanger, a 20-year incumbent in the 24th, which represents Augusta County, Staunton and Waynesboro among others in the State Senate, received 7,647 votes, or 60.3 percent of the more than 12,500 votes cast in the primary.
Businessman Dan Moxley was a distant second in the race, receiving 3,489 votes, or 27.5 percent. Marshall Pattie, a member of the Augusta County Board of Supervisors and a James Madison University professor, was third with 1,551 votes, or 12.2 percent.
No Democrat has filed in the 24th, so the GOP primary was effectively the election, with the seat up for another four-year term in November.
Hanger has represented the district since 1996.