Last updated on .From the section Championship

Lee Tomlin's late winner was his third goal of the season for Cardiff City

Cardiff City maintained their unbeaten run under new boss Neil Harris thanks to Lee Tomlin's dramatic late winner.

Tomlin created Danny Ward's equaliser before lashing home the winner in stoppage time.

The bottom side had given an excellent account of themselves in South Wales and twice led through Conor Chaplin's opener and a Lee Peltier own goal.

However, Bambo Diaby's deflected own goal, Ward's fine finish and Tomlin's dramatic winner earned Cardiff victory.

The win means Cardiff rise to eighth, while Barnsley remain bottom of the Championship.

You certainly would not have known what a perilous position the Tykes are in based on a fine first half display where they created more chances than the hosts.

Compact, organised and brave in possession, Barnsley looked anything but a side struggling at the foot of the table.

They had already threatened through the lively Chaplin whose fierce drive was blocked when they took the lead on 16 minutes as Cardiff turned over possession and Chaplin stroked home after Mike Steven-Bahre slipped him in.

The goal came just a minute after Junior Hoilett's curling effort from 25 yards had just skimmed the Barnsley goal.

Cardiff's Aden Flint in action against Barnsley's Jacob Brown

However, Barnsley held their lead for only four minutes before Hoilett's pinpoint cross was turned home at the near post via a combination of Aden Flint, who got across his marker, and Barnsley defender Diaby.

The Bluebirds sensed a chance to take control but, after Gary Madine's effort was ruled out for a contentious offside, Barnsley began to break at pace and came close when Neil Etheridge fumbled Bahre's stinging effort. Chaplin also could have added a second, but he fired over at the near post.

However, Barnsley kept their momentum after the break and led within two minutes when Diaby avenged his own goal by beating Lee Peltier to the ball to turn home. Again it was questionable who got the decisive touch, although Diaby certainly celebrated like he did.

The goal was no less than Barnsley deserved and for 10 minutes they dominated, but crucially did not find a third goal to ensure a nervous finish.

Cardiff were creating very little but from nothing they grabbed an equaliser when Lee Tomlin's skill and vision provided an opening for substitute Danny Ward who fired into the roof of the net to set the stage for a grandstand finish.

Marlon Pack volleyed over and Tomlin dragged wide as the hosts pushed for a winner, which eventually came deep into added time when Tomlin crashed the ball home at the back post as Barnsley failed to clear.

The loss means the Tykes have gone 17 Championship games without an away win.

Cardiff City manager Neil Harris told BBC Sport Wales:

"First and foremost let me be very honest, that wasn't a great performance from us.

"I thought we were a little bit lethargic and I'll hold my hands up for it. We've had a tough week, when we don't have a midweek game I have to find a way of working the group and getting them up to speed because maybe I pushed them too hard.

"We saw a performance where we were half a yard off it. Credit goes to Barnsley, I spoke before about their qualities and how hard they work and they made it difficult for us, but we weren't great.

"But I will praise my players by saying they found a way to win, and good sides find ways to win. "We've got 10 points from four games, so my players are finding ways to win."

Barnsley manager Gerhard Struber told BBC Sport Wales:

"The feeling now is like being hit in the head. I am very frustrated and disappointed for me, my staff and my team.

"We had control of the game in the first 20 minutes of the second-half, we had the lead, but after the equaliser I saw the mentality of the previous month in my players.

"The mindset was not to go on and win the game, the personality is not to go and get the next goal, many players were thinking it would be difficult.

"This change is my job and responsibility, I need to change the mindset so the players believe they can win, but now it's only a mentality situation. The history of losing is in their minds.

"I think when the performance is good and you have this result, it is more frustrating."