St Helens have beaten Wigan Warriors 18-14 in the Super League Super 8s after a last-minute try by Josh Jones.
Jordan Turner crossed the line for St Helens after 12 minutes, but the video referee revealed an obstruction in the build-up and the scores remained deadlocked.
Wigan opened the scoring four minutes later when Joel Tomkins crossed the line, and the Warriors continued to put pressure on the St Helens defence throughout the first half.
The Saints were level before half time though when Luke Walsh crossed the line and the try was awarded after consultation with the video referee.
Wigan regained the lead in the 46th minute, when James Roby was penalised for interference and Matty Bowen kicked through the posts to add an extra two points.
The lead was extended eight minutes later when George Williams shimmied past the St Helens defence to cross under the posts.
Joe Burgess then thought that he had wrapped the result up for Wigan after catching a high kick from Matty Smith, but there was a knock-on in the build-up.
Adam Smith took St Helens within two points of their opponents in the 56th minute when he dodged two Wigan tackles before touching down.
With two minutes remaining, Wigan had another try disallowed when Anthony Gelling was held up above the line.
St Helens stole the victory in the final minute when Josh Jones outjumped Matt Bowen to touch down.
The result denies Wigan Warriors a place at the top of the Super League table.