Dunlop reduced the deficit on lap three to two seconds but McGuinness began to dig deep on the fourth lap and was over five seconds in front at the Bungalow.
Following the second round of pit stops, his lead was now up to 11 seconds over Dunlop, with Anstey into third place on his HM Plant/Padgett's Honda.
Quattro Plant Kawasaki rider Hillier was following McGuinness on the road and began to climb the leaderboard, slotting into fourth place.
McGuinness began the final lap with a lead of almost ten seconds from 24-year-old Dunlop as Hillier took over third by three tenths of a second from Anstey.
Martin was fourth, with Rutter and William Dunlop the leading half dozen.
McGuinness held station on the final 37.73-miles to close out a superb 20th victory over Dunlop, with Anstey narrowly edging out Hillier the final place on the rostrum by fractions of a second.
Tyco Suzuki's Martin claimed fifth ahead of Rutter on the third Honda TT Legends machine.