A late header by centre-back Dimitrios Goutas earned Cardiff a narrow 1-0 Championship victory in a dire encounter against struggling Millwall.
Greece international Goutas pounced direct from a corner in the 78th minute to seal three points the Bluebirds scarcely deserved.
An encounter dreadfully low on quality looked destined to end goalless, before a brief spell of pressure in the closing stages swung it in the Bluebirds' favour.
It was a grim afternoon for Millwall who now have just one win in their last 10 league games and are sinking into a Championship relegation battle under boss Joe Edwards, who replaced the sacked Gary Rowett in October.
Neither side went into the game with any momentum, the hosts having lost their previous two matches against Southampton and West Brom, and Millwall with one win in their last nine.
The first half typified their respective struggles. It was desperately low on quality and meaningful attacking play at either end.
A strong swirling wind did not help the fluency, but poor passing and aimless defensive clearances characterised some frustrating fare.
Millwall had the better of the territory and possession in the opening 45 minutes, yet Bluebirds goalkeeper Alex Runarsson was not tested at all.
Josh Bowler, operating on the right of the Cardiff midfield, produced some promising moments for the home side that fizzled out before seriously troubling defenders.
There were 42 minutes on the clock when Millwall midfielder Ryan Leonard produced the first shot of the game - which posed more of a threat to the corner flag than the back of the Cardiff net.
It marked the start of a mini-purple patch for the visitors just before the interval and striker Kevin Nisbet should have done better when a low Leonard cross found him in space eight yards out.
Millwall began the second half with more urgency and the pace of Brooke Norton-Cuffy on the right flank gave Cardiff some uncomfortable moments.
Bluebirds boss Erol Bulut had brought on striker Yaku Meite and Wales midfielder Rubin Colwill at the break but his attempt to shake up his lethargic side looked to be floundering.
Millwall built pressure up the hour mark and when Nisbet flashed a direct free-kick just wide in the 56th minute, there was a sense a Lions breakthrough might be imminent.
Instead it was Cardiff who fashioned the first gilt-edged chance of the game.
It fell to Meite 15 yards out after Colwill squared, but the Ivory Coast international's effort lacked conviction and was straight at the body of Matija Sarkic in the Millwall goal.
Cardiff began to show some long overdue urgency going into the final 20 minutes and finally broke the deadlock through the head of Goutas.
His effort found the net via the hand of Sarkic and was not a goal for the purists but it proved enough to earn maximum points for the hosts.
Cardiff City: Rúnarsson, Goutas, McGuinness, Wintle © (Ralls 70'), Ugbo (Meite 46'), Bowler (Etete 70'), Grant, Collins, Siopis (Adams 89'), Ng, Robinson (Colwill 46'). Unused subs: Alnwick, Romeo, Panzo, Tanner.
Millwall: Sarkic, Wallace, Hutchinson, Nisbet (Bradshaw 70'), Mitchell, Flemming (Watmore 70'), Longman (Emakhu 81'), Campbell, Norton-Cuffy, Leonard, Harding. Unused subs: Bialkowski, McNamara, Esse, Honeyman, Grant, Adom-Malaki.