James Tedesco scored a brilliant last-gasp try as New South Wales retained the State of Origin shield with a dramatic 26-20 victory over Queensland in Sydney.

The Blues surrendered a 12-point advantage in the second half as a deciding Game III at ANZ Stadium entered a tense finale, but Tedesco touched down his second of the match as New South Wales secured back-to-back series triumphs for the first time since 2005.  

Queensland took the lead when Felise Kaufusi touched down in the 15th minute, only for Paul Vaughan to bundle over and help send the teams into half-time level.

Tedesco and Damien Cook put Brad Fittler's side in charge before the hour mark with terrific efforts, but Josh McGuire and Josh Papalii levelled things up with four minutes remaining.

New South Wales were not to be denied, though, as Tedesco - who was named the Wally Lewis Player of the Series - ended Queensland's run of seven straight victories in State of Origin deciders in the final 30 seconds.

James Maloney played a key role in the Blues' resounding 38-6 Game II triumph in Perth and he got them off the mark with a sixth-minute penalty on Wednesday.

Corey Norman dabbed a grubber kick in behind that Kaufusi latched onto to score, before the Maroons' Ethan Lowe added the extras and split the posts from a penalty.

However, the Blues went into half-time level when Maloney added the extras after Vaughan somehow grounded the ball despite McGuire, Christian Welch and Cameron Munster attempting to hold him up.

And they maintained the momentum when Tedesco angled a powerful run into the left corner and flattened Dane Gagai to get over.

Cook gave the Blues a 12-point lead in stunning fashion when he sprinted out of dummy half and bamboozled Munster just before the hour mark, but the match was not done.

The Maroons rallied and got their reward. McGuire broke New South Wales' defensive line and retained enough momentum to slide over despite Cook clinging on, before Papalii went through in the 77th minute.

Extra-time beckoned, but Blake Ferguson did well to remain in touch on the right edge and feed Tedesco, who left Moses Mbye on the floor and again got the better of Gagai for a fine score.

While the players celebrated on the pitch, Maloney lined up the conversion and sent it between the posts to seal a memorable triumph.