Rangers celebrated the first three points of the new decade, but had to work for them by a determined Hartshead side, who didn't let an early dismissal knock them out of their stride.
A corner presented Deighton with their first chance, however, despite a good delivery, it couldn't be converted by Luke Dubery, and the ball was cleared.
The visitors responded with a strong run down the left wing, but the overhit cross bounced behind the goal without troubling Jonty Smith.
James Woodward was next to chance his luck from the edge of the area but closed down quickly his shot soared over the crossbar.
Winning the first of many free-kicks just outside Deighton's area, Hartshead produced a fast cross, but it travelled through the area untouched.
The match was stopped for a short time as Woodward went down clutching his head, however after some treatment, he was able to continue.
Hartshead were mainly attacking down the left-wing, but they had trouble beating Sam Richardson and John Large who produced several tackles to deny them.
A quick ball released Ashley Tatler, but equally as quick was Hartshead's keeper who managed to poke the ball away from the striker as he looked to go round the custodian.
The match moved up a notch in drama in the 24th minute when a Hartshead player was a little too vocal towards the match official, and Mr Payne showed him a red card for his troubles.
The first serious save by the Hartshead keeper came in the 27th minute when he spread himself well to block Woodward's fierce close-range drive.
Hartshead were still looking threatening despite the numerical disadvantage, and it was another free-kick that was met at the back post, but the header was off target and bounced wide.
Rangers were having problems adapting to playing ten men, and Smith had to produce a good save following a shot from distance. As Hartshead looked to pounce on the rebound, they demanded a penalty as Luke Dubery challenged, but Mr Payne waved away the protests.
A spate of yellow cards saw Dubery and Richardson join another Hartshead player in the book as tensions threatened to boil over.
Receiving a pass from Josh Barden, Jake Little's cross looked to be falling into the keeper's hands, but Tatler nipped in to steal the ball. However, as he tried to feed the ball back into the middle, a covering defender cleared.
A deep cross saw Smith jump to punch clear, but he fell over a cluster of players and landed awkwardly, requiring several minutes of treatment before getting up.
Half-Time: Kirk Deighton Rangers 0 v 0 Hartshead
A new keeper entered the field for the second half as Smith was unable to continue and taking his place was Chris Plews.
Trying to up the ante, Rangers produced two quick attacks with Little forcing the keeper to push his shot wide with Rob Holliday unable to get the rebound. Straight away Tatler sprung the offside trap, but as he drove into the area, he couldn't get his shot away cleanly, and in the end, it spun harmlessly out of play.
Rangers seemed to be getting a firm grip on the game and Richardson moved the ball to Holliday, who in turn found Joe Turley. Cutting past his marker, Turley unleashed a curling shot straight into the keeper's midriff.
The visitor's passing was causing problems for Rangers, and a fast-flowing move saw Hartshead break down the right, but sliding in at the last moment to clear was Holliday.
The final ball seemed to be an issue for Rangers as a combination of misplaced passes undid plenty of good build-up play for Deighton.
A quickly taken throw-in, after a good battle by Jake Little, allowed Woodward to collect the ball and move across the area. Hitting his shot with power, the accuracy wasn't on point, and it cleared the crossbar.
A half-cleared shot bounced around Deighton's area was collected by a Hartshead player, but closed down by Large, he screwed his shot and Plews watched it go wide.
Turley was becoming heavily involved, and a full-bodied volley at the far post flew past the post before his cross needed a good headed clearance from the defender.
Rangers were creating chances, and Tatler's cross was inches away from being converted by Little. This proved to be the last action for Little, as he was replaced by Jack Holliday with Mason Sheridan-Hawley also coming on for Richardson.
Jack Holliday proved to be the catalyst that Rangers needed as his flick-on just outside the area allowed Barden to move into the area and dink the ball over the keeper and into the net on 71 minutes.
Tatler was being a handful on the right, and on several occasions, he forced a corner or throw-in with his skill.
Hartshead refused to lie down and pushed Rangers back several times and gained their reward in the 78th minute when Plews looked to have collected a corner, but a collision with a red shirt saw the ball squirm from his grasp and into the net.
The goal spurred the visitors on, and Plews had to make two good blocks as the visitors moved the ball into the area searching for the winner.
There was a sharp intake of breath from the Rangers contingent as Sheridan-Hawley lost his footing trying to get a tackle in, however, covering him was Woodward who knocked the ball out of play.
Crosses were coming in for Rangers, but none of them were leading to chances until the 88th minute when Jack Holliday ran in front of the defender and produced a deft header to beat the keeper.
With seconds left on the clock, Hartshead were awarded a free-kick just outside Deighton's area. Hitting it well, the ball arched over the wall, but fortunately straight into Plews's hands and that signalled the final whistle and three hard-earned points.
Full-Time: Kirk Deighton Rangers 2 v 1 Hartshead
Match report by KDRAFC Media
Team: Smith, Richardson, Turley, Wilks (c), Large, Dubery, Holliday.R, Woodward, Little, Barden, Tatler. Subs: Plews (Smith 46), Mason-Sheridan (Richardson 67), Holliday. J (Little 67).
Goals: Barden (71), Holliday. J (88)
Sin-Bin: Rangers (none), Hartshead (none)
Yellow Cards: Rangers - Richardson (foul), Dubery (foul). Hartshead - 2 players (fouls)
Red Cards: Rangers (none). Hartshead - 1 player (dissent)
Referee: Mr Jason Payne
Bennett & Fountain Kirk Deighton Rangers Man of the Match award winner: John Large