Gary Madine scored one goal and made a second as Bolton stunned high-flying Cardiff 2-0 at the Macron Stadium.
Madine, linked to a possible move in the January transfer window, fired Phil Parkinson's side in front with a 75th-minute penalty. And with two minutes remaining the ex-Sheffield Wednesday forward unselfishly set up Josh Vela for the midfielder's first goal of the season to seal a vital three points for Wanderers.
Cardiff disputed the penalty and Neil Warnock's side also felt a first-half Junior Hoilett goal had been wrongly disallowed for offside. But Bolton, beaten at home by fellow strugglers Burton a week ago, were good value for victory in a contest low on quality.
The Welshmen kicked off four points behind leaders Wolves and a whopping 31 ahead of their hosts but for long periods there was little to choose between the sides.
A first half of 15 free-kicks told its own story with neither side capable of stringing together any kind of telling move. Joe Ralls had a shot from the edge of the box blocked by defender Mark Beevers while Mark Little, restored to the starting line-up after injury, fired wide after Sol Bamba's loose clearance.
Hoilett did get the ball in Wanderers' net after 28 minutes and momentarily the away fans were celebrating. Eventually though referee Darren Bond signalled offside as Hoilett was almost on the goalline when he collected a loose ball near an upright before tapping into an empty net.
The start of the second half was equally dour, and free-kicks were still being conceded at an alarming rate. Loic Damour was cautioned for a foul on Darren Pratley while Karl Henry was also booked.
Eventually on the hour Parkinson had seen enough and replaced the ineffective Will Buckley with former Cardiff man Craig Noone who received a decent reception from the 1,010 opposition fans.
David Wheater brought the home supporters to life with a thunderous right-foot drive from long range and Cardiff made a first change of their own after 66 minutes with Omar Bogle replaced by Kenneth Zohore.
But it was Bolton who made the breakthrough 15 minutes from time, albeit in debatable circumstances. Bamba was adjudged to have handled Beevers' header, though the Bluebirds skipper claimed he had been pushed by Beevers.
Madine stepped up and calmly slotted the penalty beyond Cardiff goalkeeper Neil Etheridge to give the home side a shock lead and register his seventh goal of the campaign.
Lee Peltier and Bruno Ecuele-Manga were booked as Cardiff's frustrations grew. Lee Tomlin came on as a late substitute and was then bizarrely replaced in stoppage time as the visitors struggled to make any impact, and Vela's goal meant the home fans could celebrate an unlikely success.
Cardiff : Etheridge; Peltier, Manga, Bamba (capt.), Bennett; Halford, Ralls, Damour ( Tomlin , 77, Feeney, 90)); Mendez-Laing, Hoilett, Bogle (Zohore, 66).
Subs not used: Murphy, Connolly, Paterson, Pilkington.
Bolton : Alnwick; Little, Beevers, Wheater, Taylor; Henry, Pratley (capt.) Vela; Ameobi, Buckley (Noone, 60); Madine ( Wilbraham , 90).
Subs not used: Turner, Robinson, Cullen, Armstrong, Burke.
Goals: Madine, Vela