Cardiff held out for a nail-biting win at Zebre to keep their play-off hopes alive in the United Rugby Championship.
James Botham marked his return with two tries from lineout drives as Cardiff's pack dominated early on.
Hooker Liam Belcher and Mason Grady followed in the second half to lead 34-18 in Parma.
But Shane Lewis-Hughes was shown a late yellow card as Zebre rallied with two late to come agonisingly close to first win of the season.
Cardiff's director of rugby Dai Young said this was a "must-win" game if they are to have any chance of breaking into the top eight in the final weeks.
And their late defensive stand with 14 men kept their league season alive.
The bonus-point win takes them level with eighth placed Connacht, who play Edinburgh on Saturday.
Priestland inspires
Cardiff welcomed back Botham and Rhys Priestland from injuries and both had a major impact.
Zebre showed ambition in attack and scored through new Italy wing Simone Gesi inside three minutes.
However it is no secret how to take on the league's bottom side - without a win in 22 league games - who appear to have abandoned the traditional strengths of Italian rugby up front.
Cardiff's new front row of Corey Domachowski, Liam Belcher and Keiron Assiratti dominated the scrum.
From the resulting penalties, the pin-point boot of Priestland, out since January with a hamstring problem, repeatedly got Cardiff in touching distance of the try line.
And Botham marked his return from appendix surgery with two tries as Cardiff's driving maul met little resistance.
Having shaken off a shaky start, Cardiff led 17-7 but any thoughts of breaking clear were dashed when Zebre's giant second-row Leonardo Krumov galloped over from 20 metres.
Geronimo Prisciantelli hit the woodwork twice but was on target either side of half-time to put Zebre ahead 18-17 early in the second half.
However Priestland and his pack regained the initiative.
The fly-half caught Zebre napping with a quickly-taken penalty, kicking across field where the bounce fell kindly for Grady to stroll in.
Cardiff's forwards then completed a hat-trick of tries from their attacking lineout when hooker Belcher rumbled over on 51 minutes.
Jason Harries should have weighed in with a try when he charged down a kick, but the wing inexplicably tried to volley the ball over the line and showed just why he is not a football player.
Grady was also denied a second when he was held up over the line.
Priestland's replacement Jarrod Evans kicked a 66th-minute penalty and Cardiff needed the breathing space late on.
Trulla stepped through to score and when flanker Lewis-Hughes, making his first start since October, was shown a yellow card nine minutes from time, Cardiff looked ragged.
Matt Kvesic then burrowed over to set up a thrilling climax but Rhys Carre produced a crucial turnover and Cardiff held out - just.
Cardiff director of rugby Dai Young:
"We're relieved. We must have won that game three times over but we knew [Zebre] can score from anywhere and it went right to the end.
"There are obviously things to work on but the set-piece and driving maul was good and set the platform.
"In the end, we couldn't have done more than five points and we march on."
Zebre: Richard Kriel; Kobus Van Wyk, Erich Cronje, Enrico Lucchin, Simone Gesi; Geronimo Prisciantelli, Chris Cook; Paolo Buonfiglio, Jacques Du Toit, Muhamed Hasa, Jan Uys, Leonardo Krumov, Luca Andreani, Jacopo Bianchi, Giovani Licata.
Replacements: Giampietro Ribaldi, Luca Rizzoli, Riccardo Genovese, Dave Sisi, Matt Kvesic, Alessandro Fusco, Nicolo Teneggi, Jacopo Trulla.
Cardiff: Ben Thomas; Owen Lane, Mason Grady, Max Llewellyn, Jason Harries; Rhys Priestland, Lloyd Williams; Corey Domachowski, Liam Belcher, Keiron Assiratti, Josh Turnbull (capt.), Teddy Williams, Shane Lewis-Hughes, James Botham, James Ratti
Replacements: Liam Belcher, Rhys Carré, Will Davies-King, Seb Davies, Thomas Young, Ellis Bevan, Jarrod Evans, Matthew Morgan
Referee: Mike Adamson (SRU)
Assistant referees: Riccardo Angelucci & Matteo Locatelli (FIR)
TMO: Ben Blain (SRU)