Wakefield's Jacob Miller scored a penalty try to snatch a 16-12 victory from the jaws of defeat at St Helens.
St Helens tries: Morgan, Percival (2)
St Helens goals: -
Wakefield tries: Caton-Brown (2)
Wakefield goals: Williams (4)
All the signs looked as though Saints had done enough to bag the points after centre Mark Percival powered over for a second-half double, but Keiron Cunningham's side could not finish the job and Trinity struck right in the nick of time.
In the dying minutes Miller pushed a kick in-goal and the officials judged Saints full-back Tommy Makinson had interfered with Miller enough to stop him from scoring.
The call was met with rage at the terraces of the Totally Wicked Stadium after it looked a dubious call.
Wakefield did enough to hang on but it could have been a different story for the home side.
But, at 10-4 in front at the break, Wakefield were excellent value for money and deserved to be ahead.
Saints had offered very little, while the visitors were playing all the football.
Trinity went ahead early doors with Sam Williams booting over a penalty after St Helens were caught holding down in the tackle.
That gift was added to 15 minutes later when Scott Grix connected with Mason Caton-Brown who touched down in style in the corner.
The try was everything the visitors were owed after a lively start. It came in simple fashion, the ball being shipped from left to right, eventually finding Caton-Brown who spectacularly dived over.
St Helens looked lethargic and had never been in the game and when they conceded another penalty in kicking distance, Williams obliged from 25 metres out.
Wakefield leader Danny Kirmond limped off with a bad-looking knee injury, and that seemed to give Saints a brief rally, however it was 35 minutes before they mustered an attack of note.
When it came it resulted in a four-pointer, as Jack Owens connected with Ryan Morgan who forced the ball down.
Percival failed to land the conversion from the touchline.
Ryan Wood went close for Trinity with a breakaway from dummy half but Saints just managed to haul him down metres short.
After a half-time ear drubbing, Saints began find their rhythm and Tommy Makinson found a hole in the Wakefield line he sent a fizzing pass to Percival who powered over.
The conversion was scuffed but Saints had got their rhythm back.
With Cunningham's side asking all the questions, Wakefield were certainly on the retreat and it did not take long for the visitors to concede again.
Theo Fages took the ball right to the line and delivered a neat pass to the onrushing Percival who had enough strength to ground the ball over the whitewash.
Catan-Brown nearly replied for Wakefield with another effort on the corner flag but Bill Tupou overcooked his pass.
With two points in it with 10 minutes remaining it was still anyone's game. Trinity engineered some half chances but they could not finish.
The pendulum swung back to St Helens but they fluffed their lines and Wakefield seized their last opportunity of the game when Grix stabbed through for Miller who did well to put himself into position to score.
Makinson did his best to put him off and that was enough for the officials to go with the penalty try call and Williams tagged the extras.
Super League fixtures, results & standings
Wakefield coach Chris Chester on the award of a penalty try and his side's subsequent success: "The official has said that he's tackled Jakob without the ball, it's a penalty try. I won't argue with it.
"I thought we deserved it over the 80 minutes. It's always special coming here and getting a win. It will give us some real confidence.
"We haven't been far away these last weeks and we stuck it out over the 80 minutes. We faced some adversity during the week, we lost Anthony England in the warm-up and we had to reshuffle.
"They are always special wins when we come to Saints. We competed high and we were always going to back ourselves in the second half and we found a way to win.
"I'm happy we have broken the duck and we have got two points on the ladder. That is the most important thing.
"The key areas we need to improve on is the right edge. We came up with a few poor reads. We were a bit guilty of going into our shell as well. We were a bit conservative the way we played in the second half, but we got the result and I am a very, very happy man."
Saints coach Keiron Cunningham on the penalty try: "I thought the ruling of a penalty try was that it has to be guaranteed that the player is going to score a try. That was my understanding. Can we guarantee he is going to score it?
"I've not spoken to the ref about it, but having said that we should have closed the game out when we were in front."
Cunningham on his side's slow start: "I'm disappointed with the start. We were shocking last week and we started slow again.
"We lacked a sense of intensity as we couldn't build momentum and it's something we have to address and we will have to do something.
"We get in front in the game and we should bring it home. We are missing Matty Smith and he's sat in the stands as someone has broken his leg. A senior half-back would have brought it home. It exposed our lack of experience in the halves."