Nicky Maynard scored twice as Bristol City continued an upturn in form with a vital victory against Millwall.
The win made it four games unbeaten for City, who remain in the bottom three.
Maynard gave the visitors the lead when he ran on to Neil Kilkenny's pass to drill a low shot in on 14 minutes.
And despite Jay Simpson drawing the hosts level on 57 minutes when he side-footed Darius Henderson's cross, Maynard scored six minutes later by smashing in Albert Adomah's centre.
Adomah could have scored before that goal but dragged his shot wide, and Millwall's Jack Smith also cleared off the line from Stephen Pearson's effort.
Defeat for Millwall means they are two points above Bristol City, two places above the relegation zone.
VIEWS FROM THE DRESSING ROOM
Bristol City manager Derek McInnes told BBC Radio Bristol:
"We could have won a bit more comfortably. We could have got behind them and cut them open on a few occasions.
"But it's the same three points at the end of the day and show a bit of character, which is never a bad thing.
"There's no question that picking up any less than three points on that performance would have been a crime."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The match has reached full-time.90:00 +3:39
James Henry takes the outswinging corner, clearance made by Liam Fontaine.90:00 +1:52
Corner taken short by Neil Kilkenny.90:00 +0:58 Substitution
Substitution Yannick Bolasie comes on in place of Albert Adomah.90:00 +0:08
Short corner taken by Neil Kilkenny from the right by-line.88:15
Brett Pitman produces a right-footed shot from the edge of the area and misses to the left of the goal.86:47 Substitution
Substitution Nicky Maynard leaves the field to be replaced by Brett Pitman.83:15
Steve Mildenhall takes the direct free kick.83:15 Substitution
Substitution Kalifa Cisse goes off and Martyn Woolford comes on.83:15
Albert Adomah challenges Jack Smith unfairly and gives away a free kick.81:21
Jack Smith challenges Albert Adomah unfairly and gives away a free kick. Free kick taken by Cole Skuse.80:49
Nicky Maynard takes a shot. Save by Steve Mildenhall.77:42
The assistant referee flags for offside against Albert Adomah. Steve Mildenhall restarts play with the free kick.73:03 Substitution
Substitution Dany N'Guessan replaces Darius Henderson.69:56
The referee blows for offside against Darius Henderson. David James takes the free kick.68:40
Corner taken right-footed by Liam Feeney, clearance by Cole Skuse.68:07
Inswinging corner taken by James Henry, save made by David James.67:46
Nicky Maynard takes a shot. Steve Mildenhall makes a comfortable save.66:00
Stephen Pearson takes a shot. Jack Smith manages to make a clearance.64:52
Effort from just outside the box by James Henry goes over the bar.
Nicky Maynard is flagged offside by the assistant referee. Indirect free kick taken by Paul Robinson.62:54 Substitution
Substitution Brian Howard goes off and James Henry comes on.62:02
Assist by Albert Adomah.62:02 Goal scored
Goal! - Nicky Maynard - Millwall 1 - 2 Bristol C Nicky Maynard fires in a goal from close range high into the middle of the goal. Millwall 1-2 Bristol City.61:02
Free kick awarded for an unfair challenge on Darren Ward by Marvin Elliott. Steve Mildenhall takes the direct free kick.60:06
Albert Adomah produces a left-footed shot from deep inside the penalty box which goes wide of the right-hand upright.59:04
Header on goal by Brian Howard from just inside the area goes over the target.57:32
Albert Adomah fouled by Jack Smith, the ref awards a free kick. Direct free kick taken by Neil Kilkenny.56:07
Liam Trotter provided the assist for the goal.56:07 Goal scored
Goal! - Jay Simpson - Millwall 1 - 1 Bristol C Jay Simpson fires in a goal from inside the six-yard box to the top left corner of the goal. Millwall 1-1 Bristol City.52:48
Kalifa Cisse challenges Jay Simpson unfairly and gives away a free kick. Paul Robinson restarts play with the free kick.51:41
Marvin Elliott gives away a free kick for an unfair challenge on Liam Trotter. Free kick taken by Paul Robinson.50:56
Free kick awarded for an unfair challenge on Marvin Elliott by Darius Henderson. David James takes the free kick.49:10
Free kick awarded for a foul by Ryan McGivern on Jay Simpson. Strike comes in from Brian Howard from the free kick, save made by David James. Inswinging corner taken by Brian Howard, Ryan McGivern manages to make a clearance.48:00
Ryan McGivern gives away a free kick for an unfair challenge on Jay Simpson. Free kick taken by Steve Mildenhall.46:53
Jay Simpson takes a shot. David James makes a save.45:56
Marvin Elliott fouled by Nadjim Abdou, the ref awards a free kick. Ryan McGivern restarts play with the free kick.45:17
Effort on goal by Nicky Maynard from just inside the area clears the crossbar.45:01
The match restarts for the second half.45:00 +2:12 Half time
Half Time It is the end of the first-half.44:46
Effort from just outside the area by Nicky Maynard goes over the bar.43:31
Ryan McGivern gives away a free kick for an unfair challenge on Liam Feeney. Brian Howard crosses the ball from the free kick left-footed from right wing, save by David James.42:49
The ball is crossed by Alan Dunne.41:30
Shot by Neil Kilkenny from a long way out goes over the crossbar.41:05
Stephen Pearson decides to take a short corner.40:30
Brian Howard gives away a free kick for an unfair challenge on Cole Skuse. David James takes the direct free kick.39:09
The referee blows for offside against Darius Henderson. David James restarts play with the free kick.37:15
Direct strike on goal from the free kick comes in from Brian Howard, Liam Fontaine manages to make a clearance.37:15 Booking
Booking The referee shows Kalifa Cisse a yellow card for unsporting behaviour.36:58
Kalifa Cisse concedes a free kick for a foul on Brian Howard.35:43
Liam Feeney has an effort at goal from outside the area which misses left.34:35 Substitution
Substitution (Millwall) makes a substitution, with Steve Mildenhall coming on for David Forde.33:28
Albert Adomah takes a shot. Save made by David Forde.28:58
Darren Ward takes the free kick.28:58 Booking
Booking The referee cautions Albert Adomah for dissent.28:56
The offside flag is raised against Albert Adomah.28:01
Stephen Pearson concedes a free kick for a foul on Alan Dunne. David Forde takes the free kick.27:35
The assistant referee flags for offside against Jay Simpson. David James takes the indirect free kick.27:19
Marvin Elliott challenges Nadjim Abdou unfairly and gives away a free kick. Free kick taken by Liam Trotter.25:49
Effort from the edge of the penalty box by Jay Simpson goes wide of the right-hand upright.24:15
Jay Simpson fouled by Lewin Nyatanga, the ref awards a free kick. Liam Trotter restarts play with the free kick.20:44
Free kick awarded for a foul by Kalifa Cisse on Darius Henderson. Brian Howard takes the free kick.16:36
Free kick awarded for a foul by Darren Ward on Marvin Elliott. Cole Skuse takes the free kick.16:08
Free kick awarded for an unfair challenge on Brian Howard by Kalifa Cisse. Darren Ward restarts play with the free kick.15:37
Nicky Maynard is ruled offside. David Forde takes the free kick.14:46
Darius Henderson fouled by Liam Fontaine, the ref awards a free kick. Nadjim Abdou restarts play with the free kick.13:01
Neil Kilkenny provided the assist for the goal.13:01 Goal scored
Goal! - Nicky Maynard - Millwall 0 - 1 Bristol C Nicky Maynard finds the back of the net with a goal from the edge of the penalty box to the bottom right corner of the goal. Millwall 0-1 Bristol City.10:37
Unfair challenge on Liam Fontaine by Darius Henderson results in a free kick. Direct free kick taken by David James.9:37
Shot by Liam Feeney from deep inside the penalty area misses to the left of the goal.8:33
Free kick awarded for a foul by Liam Fontaine on Jay Simpson. The ball is crossed by Brian Howard, Darius Henderson takes a shot. Blocked by Marvin Elliott. Inswinging corner taken right-footed by Liam Feeney, clearance by Stephen Pearson.7:58
Albert Adomah is ruled offside. David Forde takes the free kick.6:45
Albert Adomah produces a cross.5:15
Jack Smith has an effort at goal from outside the area missing to the wide right of the goal.3:57
Nicky Maynard produces a right-footed shot from long range which goes wide right of the target.3:47
Liam Feeney delivers the ball, save made by David James.2:58
The offside flag is raised against Albert Adomah. Indirect free kick taken by Jack Smith.1:05
Liam Trotter sends in a cross.0:00
The referee gets the game started.
Live data and text provided by our data suppliers