Full-time score from The Den
Marcus Tudgay's dramatic injury-time winner condemned the 10 men of Millwall to a shock home defeat at the hands of struggling Barnsley.
The Lions missed a great opportunity to go ahead midway through the first half when Darius Henderson fired a penalty high and wide of the target and within six minutes The Tykes had taken the lead through Stephen Dawson.
Right-back Adam Smith received a harsh red card early in the second period when he was sent off following a 50-50 challenge with David Perkins - a decision that Millwall will be appealing.
However Millwall's gutsy 10 men battled their way back to level terms with 10 minutes remaining courtesy of a crisp Chris Wood finish.
Kenny Jackett's men looked to be heading towards a really deserved point, but were hit by a sucker-punch right at the death when Tudgay narrowly beat the offside trap and clipped the ball past keeper David Forde.
It was a bitter, bitter late blow for Jackett's men who had given their all in a bid to sign off 2012 at The Den on a high.
"Looking at the key points in the game we missed a penalty, the sending off was a harsh one and the goal at the end looked just onside, it was very, very close, " said Jackett.
"When we went down to 10 men there looked like only being one winner. Somehow it galvanised us and we had our best period of the game. The crowd got behind us and we looked like scoring.
It was hugely disappointing to have got back into it and then lose."
Jackett made a couple of changes to the team that drew at Brighton on Tuesday with Liam Feeney and Henderson replacing Jack Smith and Chris Taylor, who missed out completely with a knee injury.
It proved to be a frustrating afternoon all round for the returning Henderson for whom nothing really went right.
On seven minutes the striker would perhaps have been better going for goal himself instead of trying to find Wood, without success.
Then when he was presented with a golden opportunity to break the deadlock on 23 minutes when Scott Wiseman was penalised for a foul on last season's top scorer.
Henderson picked himself up, dusted himself down and then prompted fired the resulting spot-kick way off target.
Barely five minutes later the visitors had forged ahead when Jim O'Brien's initial effort was parried by Forde at full stretch but the loose ball fell invitingly to Dawson who fired home.
Adam Smith smashed a long-range effort over the bar and Liam Trotter, who had an excellent game, struck a volley narrowly wide as Millwall pressed for an immediate equaliser.
Henderson fired straight into the keeper's arms when through on goal, but it was Barnsley who should have doubled their tally as O'Brien fired into the side netting from a great position.
Matters went from bad to worse for Millwall early in the second half when Smith and Perkins both went for the ball and although Smith made good contact with it, referee Trevor Kettle - to the amazement of both camps - brandished a straight red card to the Millwall man.
With the man advantage Barnsley initially surged forward in search of a killer second goal with Perkins slicing horribly wide at the end of a mazy run before his free-kick was headed narrowly off target by Tudgay.
But Millwall, with Jack Smith on for Feeney and Dany N'Guessan replacing the luckless Henderson, began to really put the pressure on.
Urged on by some magnificent vocal support from the home fans, there was a growing sense that not only could The Lions haul themselves level, but go on to win the game.
Certainly part of that came true when, with 10 minutes remaining, Trotter flicked on to Wood and he provided a sublime finish to level the scores.
The Lions pushed on for a winner with Trotter firing straight at keeper Luke Steele and then N'Guessan just not able to make a clean connection with the ball eight yards out.
With the game heading towards the dying seconds of injury-time Tudgay narrowly beat the offside trap and kept his composure to dink the ball over Forde to secure victrory in the most heartbreaking of fashions.
Millwall: Forde, A.Smith, Lowry, Wright, Shittu, Beevers, Feeney (J.Smith, 63mins), Trotter, Henderson (N'Guessan, 69mins), Wood, Henry. Subs not used: M.Taylor, Dunne, Batt, Osborne, Malone.
Barnsley: Steele, Hassall, Golbourne, Foster, Dawson, O'Brien (Harewood, 73mins), Perkins (Done, 83mins), Dagnall, Cranie (Wiseman, 19mins), Tudgay, Stone. Subs not used: Alnwick, Cywka, Greening, Rose.
Bookings: Tudgay (27mins), Wiseman (28mins), Foster (39mins), O'Brien (63mins)
Scorers: Dawson (30mins), Tudgay (90+3mins)
Att: 10,118 (away 199)