A second hat-trick by Mitchell Starc has bowled NSW to an emphatic victory over Western Australia at Hurstville Oval on Tuesday.

For the second time in the match Starc claimed the final three wickets of the West Australian innings as the visitors collapsed from 0-179 to all out 223, losing by 171 runs.

Starc (3-41) was wicketless until had Jason Behrendorff caught behind for a duck, bowled David Moody next ball and then had a defiant Jonathan Well (16) caught at first slip by Steve Smith with the first ball of his 16th over.

It was the first time in the history of Australian first class cricket that a bowler has taken two hat-tricks in the one match.

Starc’s heroics followed a century from his NSW and Australian captain Steve Smith, who scored 127 in 167 balls with 17-4s and a six.

Smith declared NSW’s second innings closed at 6/300, leaving Western Australia needing 395 in 87 overs for an unlikely victory.

That was a distinct possibility while Shaun Marsh and Cameron Bancroft were batting so well together.

Western Australia lost their first wicket on the stroke of tea when Marsh drove at a ball from Josh Hazlewood (3-49) to be caught behind by Peter Nevill for 91.

After the break the reverse-swinging ball then created havoc in the hands of Australia’s Test quality pace attack.

Test hopeful Hilton Cartwright failed to score for the second time in the match, pushing at a ball from Pat Cummins (2-52) to be well caught by Kurtis Patterson in the gully.

When Bancroft (86) was leg before wicket to a Cummins inswinger it was the first time the West Australian had been out of the game after wicket-keeping and carrying his bat in the first innings for 76 not out.

West Australian captain Mitchell Marsh failed for the second time in the match, caught behind off Hazlewood for six.