Late goals by super-sub Eddie Nketiah and Matteusz Klich from the penalty spot took Leeds United back to the top of the Championship as they came away from Barnsley with a 2-0 victory.
In a game of chances at both ends, particularly in a thrilling second half, it was Marcelo Bielsa's men who produced the stronger finish to take all three points.
They were in danger in defeat in a match that livened up substantially after a dull period in the opening half, but had the firepower to get over the line.
Head coach Bielsa was pleased to have been part of a cracking derby contest that saw good football at times from both teams.
He said: "It was a match we deserved to win, but could have lost. It was open we have to say, they ran a lot and try always to play.
"Congratulations to the players and the manager as well, it's an honest team. It's special in the Championship that a team could play this well and be at the bottom end of the table.
"We kept going with the same intensity. The most important think was that it was a beautful match and I feel that everybody who watched the match would enjoy it.
"The result was open for us and open for them.
"It was not difficult for us to create situations in the first half, the difficulty was to score.
"Patrick Bamford deserved to score in the match, but Eddie Nketiah gave us another option. Bamford is a great centre-forward, he has four or five chances in every game. Before or later he will improve."
Bielsa confirmed that Adam Forshaw missed the game with a hip problem, but he should be available next week. He was also happy with the contribution of his replacement, Jamie Shackleton, who played in midfield.
He added: "Jamie Shackleton was very good, better in the first half, less impact in the second, but always enough."
Leeds initially struggled to get their game going, atlhough they had the first chance in the third minute when Patrick Bamford broke down the right only to see his angled shot saved.
It was another 32 minutes before they managed their second effort on goal and it was striker Bamford again as he was well played in by Jamie Shackleton, but once again could not get the ball past home keeper Brad Collins from an angle.
Barnsley had more threat in between the two Bamford shots with their former Leeds striker Mallik Wilks looking lively up front.
After one determined run into the box by Wilks he forced Kiki Casilla into a good save. A good run by Jacob Brown down the right flank followed, although his low cross could not find a teammate.
Barnsley's best chance of the opening half fell to left winger Luke Thomas when he was found in space in the area, but his shot was saved by Casilla's legs.
United finished the half better and should have gone in front when Jack Harrison found Pablo Hernandez in space in the home box, but the Spaniard fired his shot over.
Cauley Woodrow hit a shot over from 25 yards as Barnsley showed they could still be a threat and Wilks turned well in the area only to fire his shot wide.
On the stroke of half-time another big chance was fluffed by Leeds when Harrison somehow failed to scored from close range, hitting the post after a corner had been flicked on at the near post.
After the goalless first half Bielsa made a change with Helder Costa coming on for Harrison and a bright start saw a half chance straight away with Bamford's cross-shot being saved by Collins.
At the other end Brown's well struck shot from 20 yards out was tipped over by Casilla.
Costa looked to have made a quick impact when his superb low cross was put into the net by Bamford, but the winger was ruled to have been offside.
Another opportunity soon after saw Ezgjan Alioski head wide from a cross driven into the area.
The game had really livened up now as Wilks took advantage of Liam Cooper's slip, but could only hit the side netting from an angle and Woodrow headed straight at Casilla.
Bamford then sent a header wide for United after meeting Klich's cross.
At the other end Wilks went on another strong run past Kalvin Phillips and Casilla had to be quick off his line to deny the striker who was proving a point after being let go by the Whites in the summer.
Bamford's frustrating afternoon continued as he headed over from a corner. Costa was then well wide with a shot after making space for himself in the area before Casilla had to make a flying save to keep out a Woodrow shot from distance.
More near things followed as Alioski's good run ended in a shot wide and Mads Andersen's goalbound header from a corner for Barnsley appeared to be blocked by his own player.
It was Klich's turn to be frustrated as his cross-shot deflected just wide off Aapo Halme.
A goal had to come at one of the ends in this fantastically open second half and it was Leeds who finally broke the deadlock when Phillips' free-kick was turned in at the far post by subsititute Nketiah.
Still the hosts had a chance in the following minute with Halme heading over from a corner.
Nektiah was only denied a second by Collins who was alert and off his line quickly. The lively striker was in the action a minute later when brought down in the area by Halme and the resulting penalty was put away by Klich.
Leeds United 2
(Nketiah 84, Klich 89, pen)
Barnsley: Collins, Cavare, Andersen, Halme, Williams (Pinillos 70), Brown (Bahre 79), Sibbick, Mowatt, Thomas (Thiam 66), Woodrow, Wilks.
Leeds: Casilla, White, Cooper, Dallas, Alioski, Phillips, Shackleton, Hernandez, Klich (Berardi 90+1), Harrison (Costa 45), Bamford (Nketiah 70).
Referee: Keith Stroud