A first-half strike by Cameron Jerome gave Cardiff City victory over relegation-threatened Sheffield Wednesday but they can consider themselves lucky after a poor second-half performance.
The Bluebirds were unchanged from the side beaten by Watford last time out but a fit-again Glenn Loovens had a place on the bench.
Some magic from Jason Koumas with a deep cross in the third minute gave City an early strike on goal but Steven Thompson's header was safely gathered by Owls keeper Chris Adamson.
Cardiff were then forced back on the defensive as Wednesday won three corners but it came to nothing with Darren Purse and Neil Cox clearing the danger.
The breakthrough came in the 19th minute from a Koumas corner. Jerome was in the right spot to back-heel the ball over the line for his 16th league goal of the season.
On the half hour, Ricky Scimeca repeated the poor back-pass that led to Watord's winner last week but this time Chris Brunt sent his shot wide with only Neil Alexander to beat.
City's busy keeper was forced to push a Marcus Tudgay overhead kick behind for a corner and one minute later the same player scuffed his shot allowing Alexander to gather.
Just before the hour, Wednesday should have drawn level when a deep cross from Tudgay was skied high over the bar by former City striker Deon Burton and then Brunt fired over from a good position as Wednesday began taking control.
The Bluebirds' inability to hold on to the ball handed the initiative to an Owls side that had only scored 10 goals on their travels to date.
The visitors kept surging forward and Alexander had to paw away a close-range effort from Burton.
In the 78th minute Yoann Folly went down in the area after a challenge from Purse but referee Lee Probert waved play on.
After Jeff Whitley fouled Glenn Whelan, Alexander leapt across to punch away the fiercely struck free-kick as the Bluebirds' dire second-half showing left them grimly hanging on until the final whistle.