Last updated on .From the section Football

Sol Bamba's late first-half header was his second goal since joining Cardiff in October

Substitute Yeni Ngbakoto created one goal and scored another as QPR came from behind to beat Cardiff City and ruin Bluebirds manager Neil Warnock's return to Loftus Road.

Sol Bamba's header just before the interval put the Welsh side ahead.

But Rangers levelled when Ngbakoto smashed the ball in after a fine team move and final pass from Jamie Mackie.

Matt Smith headed the winner from Ngbakoto's corner - the striker's third goal in four since joining in January.

QPR's third win in four took them nine points clear of the relegation zone and just three behind Cardiff, but their prospects of building positively on their recent good form looked bleak at the break despite having the better of the first-half openings.

Conor Washington struck the post with the home side's best chance, but the visitors led through Bamba's header from an inviting Craig Noone corner.

Kenneth Zohore almost made it 2-0 when his shot had to be cleared off the line by Joel Lynch.

But French winger Ngbakoto changed the game, slotting home the equaliser and then teeing up Smith's header to ensure QPR could mark the 50th anniversary of their League Cup win as a Division Three side with a victory.

Queens Park Rangers boss Ian Holloway:

"Today, honouring the people who are famous to all us QPR people, to have them here and to come out and win, I'm delighted.

"We came from behind and sometimes you need your substitutes to do it. Yeni's first goal was a great move and that gave us the impetus to go and get another one.

"Neil (Warnock) will be fuming, but there wasn't a lot between us and I did feel our substitutes coming off the bench made the difference for us, and I'm delighted for them."

Cardiff City boss Neil Warnock:

"I've been saying for months we're not going to do it - if we can't win here when we dominate like that we're not going to make the play-offs.

"We were 1-0 up and really should have scored two or three goals in the second half. To then give them a chance is very disappointing.

"But to get where we are has been fabulous. The lads have really done well for me.

"We're looking to next season. I'm learning all the time - I saw one or two things today which is really helping me to decide what I'm going to do at the end of the season."