Agarkar, who had only taken 39 wickets in his previous 17 Tests and never more than three in an innings, played the leading role as he ripped through the Australian line-up to end with career-best figures of six for 41.
Australia lost their last five wickets for 13 runs with Agarkar claiming an astonishing four for four from his last 19 deliveries.