Harbhajan, who scored a 16-ball 25 in Surrey's total of 361 in the first innings, claimed six wickets for just 36 runs at the Rose Bowl as the hosts were bowled out for a paltry 146 runs on the second day yesterday.
Martin Bicknell and Mohammad Akram provided the initial breakthroughs, dismissing the openers, and then Harbahajan took over, and cleaned up the middle-order.
Medium pacer Irfan Pathan, who put behind injury worries to play for Middlesex, however had a dismal outing against Glamorgan, going wicketless in 19 overs while conceding 66 runs.
Glamorgan racked up an impressive 584 for 3 declared, and did not even have to use the services of Indian skipper Sourav Ganguly, as Daniel Cherry (229), David Hemp (103) and Jonathan Hughes (134 not out) all made big scores. Middlesex were 96 for 1 in response.