Cardiff Blues ended a run of five successive defeats in the RaboDirect Pro12 and handed Ulster a first loss in 2014 after winning a nail-biting encounter 28-23 at the Arms Park.
It was a splendid way for the home fans to celebrate the recovery of former Wales international hooker Matthew Rees, who came off the bench for his first appearance after five months of treatment for testicular cancer.
The faultless kicking of fly-half Gareth Davies contributed 23 points to a team display that will have heartened acting coaches Paul John and Dale McIntosh after a disastrous season.
At the start it looked as though it would be more of the same as Ulster centre Darren Cave handed off full-back Dan Fish to speed over for a simple opening try, even if Paddy Jackson was wide with the conversion.
Then a Tommy Bowe kick ahead was hacked dead by Blues scrum-half Lewis Jones, giving the visitors a five-metre scrum, but the seemingly inevitable second try was spurned due to a knock-on. Instead, the Welsh region cut the deficit with a Gareth Davies penalty.
The Blues, with tall threequarters Cory Allen and Alex Cuthbert looking lively, enjoyed a spell of territorial advantage and another Davies penalty put them in front after 25 minutes.
Ulster suffered a double blow when lock Dan Tuohy was sin-binned for an offence at the tackle and Davies punished them further with the resulting penalty, before the Blues pack embarked on an incredible 40-yard rolling maul which brought Davies his fourth successful kick.
And the complete turnaround of fortunes was underlined when Robin Copeland, in his 50th game for the Blues, grabbed a loose ball on halfway and fed Cuthbert, who sped inside before returning the pass with some neat sleight of hand to send the number eight over.
Davies added the conversion and another penalty to make it 22-5 and see the Blues leave at half-time to a standing ovation from an ecstatic 7,000 crowd.
Ulster reappeared with renewed energy after the interval, though, and Jackson kicked three points when Jones transgressed, before then repeating the feat after the home side handled in a ruck.
Andrew Trimble almost created an Ulster try when he collected his own kick only to unleash a wild pass, but the visitors kept up the pressure and centre Luke Marshall reached over only for the combined efforts of Josh Navidi and Isaia Tuifua prevented him grounding the ball. Italian referee Marius Mitrea had been playing advantage and Jackson landed the penalty.
The Blues, with flanker Navidi involved in everything, stormed back and a Davies penalty extended the lead, only for Jackson to reply with three of his own and close the gap to two points with five minutes left.
A superb tackle by Allen prevented an Ulster break-out before Cave conceded a silly penalty, Davies put over his eighth kick of the match and the Blues managed to survive the final frantic exchanges.
Cardiff Blues: Dan Fish; Alex Cuthbert, Cory Allen, Isaia Tuifua, Chris Czekaj; Gareth Davies, Lewis Jones; Gethin Jenkins (capt), Kristian Dacey, Taufa'ao Filise, Lou Reed, Filo Paulo, Macauley Cook, Josh Navidi, Robin Copeland.
Replacements: Matthew Rees, Thomas Davies, Scott Andrews, James Down, Ellis Jenkins, Lloyd Williams, Simon Humberstone, Gavin Evans.
Ulster: J Payne; T Bowe, D Cave, L Marshall, A Trimble; P Jackson, M Heaney; T Court, R Herring, J Afoa; J Muller (capt), D Tuohy; S Ferris, C Henry, N Williams.
Replacements: N Annett, A Warwick, R Lutton, I Henderson, R Diack, S Doyle, P Marshall, C Gilroy.
Referee: Marius Mitrea (Italy)
Assistant referees: Gwyn Morris, Sean Brickell (WRU)
Citing commissioner: Russell Howell (WRU)
TMO: Gareth Simmonds (WRU)