Gary O'Neil's first goal for Bolton gave Phil Parkinson's side a vital 2-1 victory in their Championship relegation scrap against Rotherham at the University of Bolton Stadium.
The much-travelled 35-year-old struck after 65 minutes to hand Wanderers only their second win in 20 games and a first since beating Derby on September 29.
Sammy Ameobi fired the home side in front after 33 minutes only for Rotherham to hit back within three minutes through captain Will Vaulks.
The Trotters move up a place but remain in the bottom three despite the much-needed win while Rotherham's latest defeat leaves them just one point above the drop zone.
Rotherham began well and striker Michael Smith hooked a shot from 18 yards over the crossbar.
Then defender Semi Ajayi headed over after 26 minutes, also claiming a penalty for a shirt pull.
But Wanderers took a 33rd-minute lead against the run of play when Ameobi fired home with a left-foot effort from 18 yards for his second goal in three games and his third of the campaign.
Within three minutes the Millers were level as skipper Vaulks headed home from Joe Newell's cross.
Wanderers had already had a warning of Rotherham's threat at set-pieces but that went unheeded as the United skipper was unmarked from six yards as he climbed highest to convert much to the disgust of Parkinson.
There was more concern for Parkinson as goalscorer Ameobi was left on the ground for several minutes after the rest of the players left the pitch at half-time.
He eventually limped off before emerging for the second half much to the relief of the home fans.
The final 45 minutes was far more edifying for both sets of supporters than the first period.
Bolton midfielder Mark Wilson was booked for a scything challenge on Zak Vyner before a game-changing moment on the hour.
Vaulks' right-foot drive was heading for the bottom corner until Ben Alnwick stuck out a right hand to keep his side on level terms.
Bolton picked up the pace for the final half-hour and Joe Williams saw a shot cleared off the line by the impressive Ajayi.
Christian Doidge, who has found goals hard to come by since his step up from League One, flashed a shot wide after a good cross from Jason Lowe.
But Bolton finally went ahead with 25 minutes remaining. Clayton Donaldson crossed from the byline, Rotherham failed to clear and O'Neil smashed home despite three defenders guarding the goal-line.
Substitute Josh Magennis blasted a 20-yard free-kick through the wall only for Marek Rodak to save before United laid siege in the closing stages, including six minutes of stoppage time, with Bolton hanging on for a priceless three points.