Nicky Maynard scored from close range three minutes into injury time as Bristol City beat Millwall.
The result means City move above Millwall in the Championship table into 19th, while the Lions are now one place above the relegation zone.
Both teams spurned a host of chances before the break and the game lost any momentum it had after the restart.
Millwall defender Tony Craig hit his own post but that was the closest either side went before Maynard's goal.
Albert Adomah and Marvin Elliott missed good early opportunities for City, while Liam Trotter, Harry Kane, Hamer Bouazza and Liam Feeney all had clear chances to beat David James in the home goal.
But in the dying stages Maynard, who has been transfer-listed after turning down the offer of a new contract with the Robins, popped up for his eighth goal of the season.
Adomah crossed from the right and the striker stole in to tap home from a couple of yards out.
Bristol City manager Derek McInnes:
"We said prior to the game that we'd sacrifice a performance for a result and I think that was possibly the case.
"Millwall - being the away team - got far too much of the ball and enjoyed the game too much.
"We huffed and puffed, and we were nowhere near at our best, but thankfully we kept going to the death and got our goal.
"It's harsh on Millwall, I've got to say that."
Millwall boss Kenny Jackett:
"We had a lot of chances but that's been us, we haven't scored enough goals generally.
"When the goal came at the end there it's cost us and it's cost us badly.
"We haven't got outplayed by Bristol City, we haven't been second best in any area but we've lost the game. We've had too many like that. Our 'goals for' tally has been poor."
Bristol City 01 James 05 Nyatanga 06 Carey 36 McGivern 07 Elliott (Cisse - 12' ) 08 Kilkenny 14 Skuse Booked 27 Adomah 37 Pearson 10 Maynard 34 Pitman (Bolasie - 76' ) Substitutes 22 Gerken 18 Wilson 17 Bolasie 21 Cisse (Clarkson - 83' ) 16 Clarkson Millwall 23 Mildenhall 02 Dunne 03 Craig 05 Robinson 21 Smith Booked (Marquis - 90' ) 31 Lowry 06 Trotter 08 Bouazza 15 Feeney 44 Wright (Abdou - 67' ) 37 Kane (Henderson - 85' ) Substitutes 01 Forde 14 Henry 26 Abdou 07 Henderson 09 Marquis