Cardiff Blues (3) 16 Try: B Davies Con: Halfpenny Pens: Halfpenny (3)
The Blues remain unbeaten in this season's Heineken Cup
Cardiff Blues overcame the sending-off of wing Tom James after 27 minutes to stun Gloucester at Kingsholm and reach the Heineken Cup quarter-finals.
James was red-carded after appearing to head-butt hooker Olivier Azam and the Blues trailed 9-3 at the break.
But they made light of the disadvantage as replacement Bradley Davies dived over for the vital try on 75 minutes.
Full-back Leigh Halfpenny kicked 11 points and all Gloucester could muster were four Olly Barkley penalties.
It was a remarkable performance by the Welshmen who will receive a home draw in the last eight if, as expected, they beat Italian strugglers Calvisano in Cardiff on Friday.
Gloucester, who gained a losing bonus point, must now gain maximum points against 2006 runners-up Biarritz in France and depend on other results going their way if they are to progress as one of two best runners-up.
The home side were disappointing and could not counter the physical presence of the impressive Jamie Roberts, Andy Powell and Xavier Rush, who had a huge impact on the match when he came on as substitute in the second half.
Gloucester, without injured England duo Mike Tindall and Olly Morgan, opened the scoring in the seventh minute with an audacious penalty from Barkley from inside his own half.
The home side should have extended their advantage but James Simpson-Daniel, returning from injury, messed up a try-scoring chance by over-complicating matters when a simple pass to the onrushing Willie Walker would have sufficed.
The Blues levelled via a Halfpenny penalty kick, and it was no more than the visitors deserved after a period of great attacking rugby.
But Barkley rewarded Gloucester pressure with a second penalty before James transgressed right in front of referee Alan Lewis.
Azam appeared to make the most of the contact with a slightly theatrical fall, but Lewis was left with little option but to send the Wales wing off.
Fortunately for the 21-year-old his petulance, ultimately, did not have a detrimental effect on his team, although it did look bleak for the visitors when Barkley kicked another three points to give Gloucester a 9-3 half-time lead.
After the break, Halfpenny's penalty crept over thanks to a little help from the inside of the post and the Blues were inspired in defence and still threatening in attack.
Powell and Roberts again made inroads and Jason Spice nearly finished the move with a try only for the video referee Marshall Kilgore to deem the scrum-half was held on the line by Alex Brown.
Gloucester were attacking the Blues through the middle rather than adding width to their game, which may have yielded more reward with the visitors' backline a man down.
The hosts still appeared favourites though when Barkley's fourth penalty made it 12-6 with 20 minutes remaining.
But Halfpenny atoned for two failed attempts at goal earlier in the second half with a penalty which brought the Blues to within three points.
Their perseverance paid off five minutes from time when Ma'ama Molitika and Rush barged forward, creating enough space for replacement lock Davies to evade two would-be tacklers and dive over.
Halfpenny converted and despite a late Gloucester salvage mission, the Blues emerged with the only unbeaten record in the competition.
Gloucester director of rugby Dean Ryan: "It wasn't good enough. We are coming second in these head-to-head contests at the highest level.
"It has got to change. We can't keep getting found out. We came clearly second, and we haven't made enough progress to compete at this level.
"At this high level of Heineken Cup rugby, it is based on physicality and discipline and we've repeatedly come second in those areas."
Cardiff Blues director of rugby Dai Young on Tom James' sending-off: "It was a silly thing for Tom to do. It was more a defensive gesture than an aggressive one.
"He (Azam) went for the Hollywood, which is something we want to take out of the game.
"When I was playing, you didn't see hookers going down as quickly as that. We don't want to see players out there looking like soccer players."
Young on the victory: "We've built strong foundations. The team play for each other and have a real hard edge.
"We haven't achieved anything yet, but if we can go through to the quarter-finals unbeaten, it would be a huge a statement."
Gloucester: Walker, Balshaw, Watkins, Barkley, Simpson-Daniel, Lamb, Cooper, Dickinson, Azam, Nieto, Bortolami, Brown, Strokosch, Satala, Narraway. Replacements: Allen for Watkins (61), Lewis for Cooper (60), Wood for Dickinson (55), Titterrell for Azam (67), James for Bortolami (47). Not Used: Eustace, Foster.
Cardiff Blues: Halfpenny, G. Thomas, Shanklin, J. Roberts, James, N. Robinson, Spice, Jenkins, G. Williams, G. Powell, D. Jones, Morgan, Molitika, M. Williams, A. Powell. Replacements: T. Thomas for G. Williams (67), Filise for G. Powell (57), Rush for A. Powell (63), Davies. Not Used: Allinson, Sweeney, J. Robinson.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.