Ryan Williams netted a 95th-minute winner as Barnsley won an incredible match at Cardiff City 4-3.

The home side took the lead in the fourth minute but Sam Winnall levelled with a fantastic header then he and Josh Scowen made it 3-1 at the break after excellent counter-attacks powered by Ryan Kent's express pace.

Cardiff, who had the majority of the play and chances throughout, scored in the 79th and 89th minutes but substitute Williams netted his first goal for the club after an injury-plagued two seasons.

Barnsley will spend Christmas 12th in the Championship, six points off the play-offs and 11 clear of the relegation zone.

Paul Heckingbottom kept the same side that lost at Sheffield Wednesday four days earlier, while Marley Watkins and Adam Jackson returned to the bench after suspension and injury.

It was a bad start for the Reds as Sean Morrison headed Peter Whittingham's right-sided corner into the top left corner of the net in the fourth minute.

Sam Morsy registered Barnsley's first shot after 11 minutes when his 20-yard effort was palmed over the bar by home goalkeeper Ben Amos.

The visitors then levelled on 19 minutes when Conor Hourihane crossed from the right and Winnall sent a fantastic header from the left of the box into the bottom right corner of the City net.

Cardiff should have retaken the lead instantly as Morrison headed another Whittingham corner over then Junior Hoilett went clean through in the middle of the box but dragged his shot wide from ten yards.

Adam Davies made a good save to deny Bruno Manga from another Whittingham corner.But it was the Reds who went into the lead when a counter-attack ended with Morsy bringing down a Kent cross and passing to Winnall who finished with ease.

Davies again tipped the ball over his bar after Kenneth Zohore headed Craig Noone's cross, but it was the Reds who got the next goal with two minutes left in the first half.

Once again Cardiff were caught from one of their own corners as Hourihane played a great ball through to Kent who nudged it past onrushing goalkeeper Amos for Scowen to tap into the empty net.

Davies made another decent save from Zohore on the stroke of half-time then Heckingottom's men walked off with a 3-1 lead.

City almost pulled one back 18 seconds after the interval when Hoilett looked certain to turn in a right wing cross from six yards out but, sliding, he sent his shot into the outside of the left post.

The home crowd then wanted a red card for Davies after he tripped Zohore just outside the box but only a yellow was shown as there were defenders covering for the goalkeeper. Very little happened for the next 25 minutes but Barnsley's goalkeeper was still alert enough to brilliantly claw Manga's header off the line.

Davies was eventually beaten on 79 minutes by Whittingham's powerful shot from the edge of the area into the top left corner after Scowen made a mess of a clearance.

Anthony Pilkington almost levelled when his low long-range shot whistled just past the left post then Davies was at full stretch to deny another good Whittingham effort from even further out.

Pilkington eventually made it 3-3 as he hooked in on the line following a penalty area scramble. Former England international Rickie Lambert fired wide when he had a fantastic chance to make it 4-3 to the Bluebirds, but instead it was the visitors who won it. Marley Watkins brilliantly burst into the box then squared to fellow substitute Williams who tapped in from four yards out.