Neil Warnock says his Middlesbrough side were punished for their first-half profligacy after a 3-2 defeat at Huddersfield.
Boro impressed and led after 14 minutes in West Yorkshire through Marvin Johnson's effort and arguably should have extended that lead but somehow found themselves trailing at the break following goals from Carel Eiting and Fraizer Campbell.
A late Britt Assombalonga penalty looked as though it would earn the visitors a share of the spoils but Town had other ideas when they stole the points through Josh Koroma in the 85th minute.
It left Warnock rueing their missed chances.
"The game should have been over after half an hour really," Warnock said.
"It was a big disappointment for us to go in 2-1 down at the break – it was a travesty. But silly mistakes led to their goals.
"We had so many opportunities to put the game to bed. And then when we did get it back to 2-2 they go down the other end and score again.
"We should have had a stonewall penalty with a minute to go and when you watch back it was a penalty.
"But we made errors and when you make mistakes you get punished, like we have today."
Boro bossed much of the first half but somehow trailed 2-1 at the end of it.
Johnson fired them into a 14th-minute lead. When Boro pressed from a Town goal-kick, Marcus Tavernier fed Johnson and he rifled home inside the box.
They should have been in front already by that point but Assombalonga inexplicably fired over the bar from a few yards out.
Despite their dominance, Boro only led by a single goal and it came back to haunt them by the interval.
Eiting equalised when he swept home from the edge of the box after good work in the build-up from Koroma.
And just before the half came to a close Campbell turned the game on its head.
Lewis O'Brien pressed and stole the ball off George Saville before feeding Campbell. The 33-year-old still had plenty to do but he turned onto his left foot and steered the ball beyond Marcus Bettinelli.
Town bossed much of the second half but Boro thought they had sealed a point when they were awarded a penalty in the 83rd minute after Naby Sarr felled Jonny Howson.
Assombalonga fired it home but there was to be further drama.
Koroma cut in from the left and curled a sumptuous effort into the bottom-right corner to seal a first win in five matches for Town.
Town boss Carlos Corberan said: "Today we showed lots of character to dig in and win the three points.
"We didn't start well and we were facing a team with the least amount of goals conceded in the Championship so we knew it would be tough.
"But we went in front and we were comfortable in the second half.
"We then had a test of our character after the penalty but we came through against what was a physical side."
Corberan was also pleased that his side managed to win after coming from behind – for the first time since he arrived at the club.
He added: "It was a challenge we knew we'd face at some point and that we'd have to change the dynamic at some point.
"We had to attack better and find more players in the last line and try to surprise the opposition."