The Blues went into the game under huge pressure with the Scarlets and Newport Gwent Dragons having won their weekend clashes amid the Welsh regions' battle to ensure automatic qualification to next season's Heineken Cup.
The Ospreys loss at Edinburgh keeps them worrying about that issue, but the other Welsh teams have a game in hand on the Blues.
Leinster took full advantage of the home side's early nerves and indecision and after a failed penalty exchange between McFadden and Blair the visitors took the lead after number eight Stephen Keogh set up the chance for McFadden to score.
The Leinster centre added the conversion and put his side further ahead when Blues prop Taufa'ao Filise collapsed a scrum in the shadow of his posts.
Filise's front-row colleague Gary Powell earned a large dose of revenge moments later as he appeared on the right wing to power over from close range.
But Blair failed to convert and also missed a penalty shot before Gareth Cooper and Filise combined to put Wales hopeful Sam Warburton over.
Blair converted that second Blues try, but the visitors went in 16-12 ahead at the break as McFafdden kicked his third penalty of the opening period with the last act of the half.
The Blues took the lead within a minute of the restart as Sweeney, Casey Laulala and Scott Morgan put Czekaj into enough space for the wing to touch down.
That put the Blues into the lead for the first time at 17-16 after Blair failed to convert from the touchline.
McFadden also fluffed his next chance after Xavier Rush high-tackled Berne. But Leinster went back ahead when Eoin O'Malley's mazy run set up hooker Jackman for a 25-metre sprint to the line. McFadden converted.
Andy Powell takes the field for the Blues on his return
Sweeney's spear tackle on Berne after 54 minutes earned the Blues fly-half 10 minutes in the sin-bin.
As he departed the Blues sent on back-row forward Andy Powell for the first time since he was removed from the Wales squad over an incident that led to him being convicted of drink-driving.
Scrum half Lloyd Williams, son of ex-Wales and British and Irish Lions number nine Brynmor also joined the fray for the Blues.
Berne failed with a drop-goal attempt and the visitors were denied by the video ref's judgement as their pack ploughed over the home line after 71 minutes.
Blues prop Powell departed on a stretcher after a scrum collapsed near the home line to damage an Achilles and Warburton departed complaining of a tight calf.
Berne then dropped a goal to give his side a cushion, but that was eroded after lock Devin Toner was sin-binned for deliberately knocking on as the Blues pressed.
Sweeney punished Toner's indiscipline, but McFadden sealed his man-of-the-match display with an 80th-minute penalty that denied the Blues a bonus point.
Blues boss Dai Young: "We've had one week off - on occasions we looked like we had 21 weeks off.
"Some of the handling errors were very poor, we lacked a little bit of structure and we created our own problems.
"We were under pressure coming into this game and we know it's going to go to the wire and I don't think that will change, but obviously we've got to pick up points with five games left.
"We've got to look to win all five, but we will have to be better than we were tonight because if we'd played anywhere like we had over the last six weeks it's a game we would have come away quite comfortably with.
"We were making plenty of line-breaks first half, but chucking away silly ball and putting ourselves under huge pressure.
"We knew they were going to be very physical and try to force mistakes and pretty much play on the counter-attack or try and get penalties and that was pretty much what they brought to the table.
"We can't prioritise competitions because we've got 23 players to pick 22 from so we can't rest players or change many."
Cardiff Blues: Blair; T James, Laulala, Shanklin, Czekaj; Sweeney, Cooper; Filise, Thomas, G Powell, Morgan, Tito, Molitika, Warburton, Rush. Replacements: Norton-Knight for Blair (67), L Williams for Cooper (57), Andrews for G Powell (73), Pretorius for Morgan (67), A Powell for Warburton (57). Not Used: Hewitt, Dowden.
Leinster: Dempsey; Conway, O'Malley, McFadden, Nacewa; Berne, Reddan; Wright, Jackman, van der Linde, Toner, O'Kelly, McLaughlin, Jennings, S Keogh. Replacements: Strauss for Jackman (59), Ross for van der Linde (61), Hogan for S Keogh (78). Not Used: S Keogh, Madigan, O'Donohoe, R Ruddock.
Bookmark with:
What are these?