Craig Conway scored an injury-time winner to give Cardiff all three points in a 3-2 thriller against Portsmouth.
Former Rangers striker Kenny Miller broke the deadlock after 15 minutes as he found space inside the box and smashed his effort into the roof of the net.
Miller had chances to double his tally in the first half but his efforts were thwarted by Stephen Henderson in the Portsmouth goal.
Five minutes before the interval, Portsmouth were able to find a vital equaliser as Marko Futacs finished from inside the six-yard box after good work from Erik Huseklepp.
Portsmouth took the lead in the 49th minute as Cardiff failed to clear a Liam Lawrence corner and Greg Halford was on hand to take advantage with a powerful finish from close range.
Mark Hudson brought Cardiff back on level terms with a powerful header following a testing cross from Craig Conway.
Conway proved to be the match winner as he fired a shot into the corner of the net in the 92nd minute to give Cardiff a dramatic win.