New South Wales 8 for 477 decl (Patterson 134, Nevill 101*, O'Connor 5-131) beat Western Australia 279 (Bancroft 138*, Whiteman 66, O'Keefe 4-78, Copeland 4-81) and 147 (Bancroft 86, O'Keefe 5-52) by an innings and 51 runs

A five-wicket haul from Steve O'Keefe helped New South Wales to an innings victory over Western Australia despite another defiant innings from Cameron Bancroft.

O'Keefe took 5 for 52 in 33.2 overs on a crumbling Bankstown Oval surface to bowl WA out for 147 in their second innings with more than hour left on the final day.

But Bancroft did cause the Blues a headache. The WA opener faced 263 balls for 86 runs as he stonewalled the New South Wales charge to victory while his teammates collapsed at the other end.

The Warriors had slumped to six for 98 before Bancroft finally found an ally he could bank on in Joel Paris. The pair put on 47 in 22 overs and weathered a difficult period against the second new ball.

Bancroft reached 620 balls for the match without being dismissed, having faced 358 of them in the first innings for his 138 not out. He did have a fair amount of luck to stay alive before O'Keefe finally found the kryptonite on the 621st. He spun one sharply past Bancroft's outside edge in the 90th over of the innings and the opener was stumped by Peter Nevill as he overbalanced.

WA only lasted ten more balls after that. Trent Copeland dismissed Paris in the next over before O'Keefe took the last two wickets with the first two balls of the 92nd over to complete his five-for.

Earlier, WA's top order found some unusual ways to get out in their efforts to save the game. Josh Inglis and Hilton Cartwright both fell to the part-time leg spin of Jason Sangha. Inglis was caught at cover driving on the up, while Cartwright fell in bizarre fashion when he pulled a long-hop into Nick Larkin at short leg and the ball ricocheted off the fielder's body and popped straight up in the air for Sangha to complete the catch.

New South Wales are on second spot on the Sheffield Shield table with their third win of the season.

Alex Malcolm is a freelance writer based in Melbourne