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."