Tommy Smith smashed home a stoppage-time winner to make it five successive Championship victories for promotion-chasing Huddersfield Town.

It looked as if David Wagner’s team would have to make do with a point at basement side Rotherham United, where they had to twice come from behind.

The boss had warned of a tough game in South Yorkshire, where Joe Lolley’s first goal of the season and Elias Kachunga’s 11th cancelled out goals by Semi Ajayi and Tom Adeyemi for the home side.

But two minutes into the four added on, skipper Smith popped up to drill in his third goal of the campaign and spark Valentine’s night delight for the Town fans behind that goal.

Video Loading

Town made five changes as they targeted a first competitive win at the AESSEAL New York Stadium, their previous two visits having ended in stalemate, 2-2 in 2014/15 and 1-1 last season.

Tommy Smith returned in place of Martin Cranie at right-back and took the captain’s armband while Tareiq Holmes-Dennis went in at left-back, with Chris Lowe rested because of a hamstring niggle.

Philip Billing was the midfield replacement for Jonathan Hogg, out for up to three weeks with a groin problem, while Rajiv van La Parra dropped to the bench with Joe Lolley earning a first league start since playing at Aston Villa in August, when he picked up a foot injury.

Up front Nahki Wells made way for big German striker Collin Quaner, the £500,000 January signing from Union Berlin, starting a third Town match in all competitions.

Rotherham, with just one point from their last five games, fielded former Town striker Danny Ward, who was up against the visitors’ on-loan Liverpool goalkeeper of the same name!

Town went into action with boss David Wagner warning of a direct and physical approach from the hosts, who had claimed all but one of their 17 points going into the contest on home territory.

Rotherham had to clear an early corner as Town took the initiative from the kick-off, but it wasn’t long before the hosts were swinging in a free-kick, with neither Richard Wood nor Tom Adeyemi able to get a connection.

Billing and midfield partner Aaron Mooy were battling away as Town sought to stamp some authority on proceedings, however having spent a spell defending, it was the Millers who struck after 11 minutes.

A counter-attack ended with Adeyemi earning a corner with a deflected shot, and from the flag kick, Ajayi bundled the ball home from close range after a touch from Wood.

Rotherham United vs Huddersfield Town, 14.02.17: Town's Elias Kachunga celebrates scoring his team's second goal.
Rotherham United vs Huddersfield Town, 14.02.17: Town's Elias Kachunga celebrates scoring his team's second goal.

Town keeper Ward gathered Joe Newell’s free-kick before Rotherham had the ball in the net again through Jerry Yates, only for Ajayi to be pulled up for offside.

But the visitors were patiently probing, and both Holmes-Dennis and Elias Kachunga had crosses cleared before Lolley’s 19th-minute leveller, the forward netting with a well-placed shot from the edge of the area.

Back came Rotherham, and Ward did well to tip over an awkward cross by left-back Ben Purrington while Newell had a shot blocked before Wood was just too high with a powerful header from another corner.

Billing had a go from distance in the 28th minute, but his effort from Lolley’s pass fizzed over, then Mooy fired in a low drive which home keeper Richard O’Donnell stooped to gather.

O’Donnell had also been tested by Izzy Brown, the on-loan Chelsea forward who spent the first half of this season at Rotherham, and the 20-year-old was denied again after 37 minutes, when his close-range effort after a determined run and cross from Kachunga was deflected for a corner.

Rotherham United vs Huddersfield Town, 14.02.17: Joe Lolley celebrates equalising for Town.
Rotherham United vs Huddersfield Town, 14.02.17: Joe Lolley celebrates equalising for Town.

Kachunga was looking lively, and when he took aim after a neat Billing pass on 40 minutes, O’Donnell could only push the ball clear rather than keep hold of it.

It was Rotherham doing the bulk of the defending as the first half drew to a close, but Town were unable to get through, with both Holmes-Dennis and Brown thwarted.

O’Donnell needed two attempts to gather Lolley’s shot early in the second half, then Kachunga headed over from Brown’s delivery before, at the other end, Ben Purrington’s shot was held by Ward while Jon Taylor was too high with a 20-yard free-kick.

Town made two changes after 62 minutes, when Van La Parra and Wells replaced Lolley and Quaner, before Kachunga headed Smith’s inviting cross wide, much to the frustration of the 2,583 travelling fans behind that goal.

Video Loading

Billing came close with a header from Mooy’s corner, but the home side regained the lead after 71 minutes, when Adeyemi beat Ward from 25 yards, the keeper getting his hands to the ball but failing to keep it out.

The lead lasted only five minutes before Kachunga squared things up again by heading home his 11th goal of the season from Mooy’s corner.

It looked like heading for a draw, but then Smith produced that wonderful finale.

Bring on Manchester City!