Cardiff Blues pulled off one of the Pro12 shocks of the season as they held out against title-hopefuls Ulster.
The hosts went into the clash with only four wins and facing the prospect of finishing last among Wales' four teams.
But after building a 22-5 lead at the break, they withstood Ulster's comeback to dent their play-off hopes.
Darren Cave went over for Ulster and Robin Copeland responded while home fly-half Gareth Davies kicked seven penalties to Paddy Jackson's six.
Ulster arrived at Cardiff Arms Park in third spot with only four defeats and targeting the play-offs, while the hosts had only Treviso and Zebre below them in the table at the start of the day.
The two teams' positions in the table did not alter and Ulster at least took a losing bonus point, while Blues will have been delighted to end the day only two points behind Newport Gwent Dragons, who drew 25-25 at Zebre earlier in the day.
In the process of winning Blues avoided a record sixth successive Pro12 defeat and halted Ulster's eight-match winning streak in all competitions.
The visitors' reputation counted for nothing to a home side still smarting from the criticism that followed their 34-9 capitulation at Ospreys the previous weekend.
They were also bolstered by the return of skipper Matthew Rees to the match-day squad following his treatment for testicular cancer.
The Wales and British and Irish Lions hooker came off the bench in the 58th minute.
Ulster put early pressure on the home defence, resulting in an easy try for centre Cave as he brushed aside full-back Dan Fish.
Four unanswered penalties from home fly-half Davies put the hosts ahead and the home side's first try was one to remember.
After Fish latched on to possession, Wales wing Cuthbert cut an in-field line before releasing number eight Copeland with a clever pass and the Irishman raced over from 40 metres.
That 36th-minute try was no less than Blues deserved in a confident and tenacious display.
Davies converted and added a fifth first-half penalty to give them that 17-point half-time lead.
Ulster had the edge at the scrums and made it tell as Jackson rewarded the pressure the visitors applied from the set-piece in the second period.
The Ireland international kicked three penalties before Davies had another chance to kick at goal
With man-of-the-match flanker Josh Navidi to the fore, Davies took that penalty opportunity to boost the home side's morale amid Ulster's onslaught.
Three more Jackson penalties followed, but in the 79th minute Davies kicked his seventh penalty and Blues' defence and discipline proved resolute in the face of Ulster's last-ditch multi-phase attack.
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)