Grant Leadbitter's injury-time penalty ensured that Chris Powell's first game in charge of Huddersfield Town ended in a cruel 2-1 loss to Middlesbrough.
It was the home side who threatened in the opening period, and Dimitrios Konstantopoulos had to be alert in the 11th minute to make a good save from Nakhi Wells, and the Greek stopper was out quickly seven minutes later to smother the striker again.
The physical Championship clash saw a number of players go in with forceful tackles, and James Vaughan was shown a yellow card for his volatile reaction to what he perceived to be a foul on him.
Vaughan had to be replaced shortly after the incident with an injury as players from both sides continued to fly into tackles in a feisty encounter.
The best chance of the opening half-hour fell the way of Joel Lynch, who thumped a header against the bar from Jacob Butterfield's corner.
Six minutes later, Leadbitter sent a powerful free kick hurtling into the back of the net to put Middlesbrough 1-0 ahead, and the goal seemed to give the visitors confidence.
Adam Clayton saw his shot crash into the side-netting before Kike tested Alex Smithies as Boro pushed for a second, but the home side held on to go in just one goal down after 45 minutes.
Kike was denied once more by Smithies shortly after the restart, and the miss proved to be costly as two of Powell's substitutes combined for Huddersfield's equaliser.
Danny Ward escaped down the left flank and squared the ball for Jonathan Stead, who turned to ball home from close range.
Huddersfield then had the chance to snatch all three points, but Wells's volley was too weak and a grateful Konstantopoulos gathered the loose ball.
Nonetheless, Huddersfield seemed to be on their way to a point from Powell's first game in charge, but a minute into injury time Tommy Smith foolishly pulled the shirt of Adam Reach inside the box.
Leadbitter made no mistake from the spot to give Boro a dramatic victory.