Ireland 34 Samoa 16: Local boy Pat Richards scored 22 points, including a hat-trick of tries, as Ireland produced the shock of the World Cup to reach the knockout stages for the second successive tournament.
The Irish, who beat Samoa on their way to the quarter-finals in 2000, stunned the highly fancied Pacific Islanders to move to within 80 minutes of a semi-final clash with defending champions Australia.
Andy Kelly's side needed to win by six points at Parramatta Stadium to top pool C on points difference but emerged from a bruising and, at times, brutal, encounter with a handsome victory margin that befitted their courage and determination.
Samoa played it physical and not all the big hits were legal but Ireland stood up to the challenge magnificently in front of a passionate crowd of 8,602.
Their reward is a semi-final qualifier, against Fiji, on the Gold Coast next Monday, with the Kangaroos lying in wait for the winners in the second semi-final.
The hero was Wigan's goalkicking winger Richards, a former Parramatta player who was brought up in the area after his parents emigrated from Dublin. He scored the first of Ireland's six tries on 11 minutes and became the second Irish player to complete a hat-trick when he scored their last two minutes from the end.
Richards, Super League's leading scorer in 2008, also kicked five goals from 10 attempts.