Pool Two/Gloucester 29 Ulster 21:Ulster's Heineken European Cup campaign may have finished with a fifth Pool Two defeat, but the province delivered a performance from which coach Matt Williams will take huge heart before he officially takes over the reins at Ravenhill next month.
Instead of the widely-expected massacre at Kingsholm, the visitors gave Gloucester an almighty fright before late touchdowns by Akapusi Qera, Iain Balshaw and Luke Narraway clinched the necessary bonus-point victory to secure a home quarter-final as the pool winners.
Ulster, fielding a dolly mixture of a side to give Williams as much information on his squad as possible before the resumption of the Magners Celtic League campaign, produced by far their best performance of their troubled season, with Tommy Bowe (two) and Andrew Trimble touching down for superbly crafted tries.
Indeed if Paddy Wallace had not missed three simple penalty chances and the visitors been able to gain parity at scrum time, the province could well have recorded a first win on English soil in the European Cup.
The visitors, showing eight changes from the side that defeated Bourgoin last week, rolled up their sleeves and proceeded to make a nuisance of themselves.
Wallace missed an early penalty which would have rewarded Ulster's stout defending in the opening exchanges but just as the first signs of frustration could be sensed from the Shed, a pirouette from Mike Tindall took the England centre clear and he found Qera on his shoulder with the flanker touching down in the 19th minute.
Far from being stunned by the score, Ulster merely served up their best play of the half with a mazy break by Isaac Boss breaching the Gloucester defence before his long pass to Tommy Bowe allowed the winger to race over in the corner without breaking stride.
Wallace's touchline conversion levelled the scores and the visitors continued to exploit basic errors from a strangely hesitant home side, with Ulster happy to counter-attack when possible.
When Alasdair Strokosch cut back following a succession of attacked Gloucester scrums to touch down under the posts in the 34th minute, with Paterson again converting, Kingsholm began to buzz again but once again it proved a false dawn.
Even with Ulster reduced to 14 men from the restart when wing Mark McCrea was shown a yellow card for a dangerous tackle, it was the visitors who regained the momentum.
A sustained forward assault deserved points but Wallace again fluffed a simple penalty chance, and was guilty of the same offence soon after the break, but still Ulster came on.
Wallace made some amends by providing the spearhead which culminated in a 44th-minute try for Andrew Trimble, with the Ulster outhalf levelling the scores with the conversion.
If Ulster had only been able to gain parity at scrum time, they might have secured a platform for the push for what would have been a shock victory.
But despite putting together an number of impressive phases, Gloucester were eventually able to quell the storm with two moments of incision which yielded a second try for Qera and secured the bonus point when Iain Balshaw raced over in the 71st minute.
There was still a final hurrah from Ulster, however, with Niall O'Connor's cross kick finding Mark McCrea and his inside pass put Bowe over from the visitors' third try.
But Ulster were denied a deserved bonus point when Luke Narraway touched down in the 79th minute to guarantee a home quarter-final for the Kingsholm side, with Ryan Caldwell knocking on over the line with the last play of a hugely entertaining contest.
SCORING SEQUENCE: 19 mins: A Qera try, C Paterson con, 7-0; 21: T Bowe try, P Wallace con, 7-7; 34: A Strokosch try, Paterson con, 14-7; 44: A Trimble try, Wallace con, 14-14; 58: Qera try, 19-14; 71: I Balshaw try, 24-14; 78: T Bowe try, O'Connor con, 24-21; 79: L Narraway try, 29-21.
GLOUCESTER: I Balshaw; J Simpson-Daniel, M Tindall, A Allen, L Vainkolo; C Paterson, R Lawson; N Wood, O Azam, C Nieto, P Buxton, M Bortolami, A Strokosch, A Qera, G Delve. Replacements: R Lamb for Paterson (50 mins); W James for Bortolami (56 mins); A Titterell for Azam (59 mins); L Narraway for Delve (65 mins); W Walker for Tindall (75 mins)
ULSTER: M Bartholomeusz; T Bowe, A Trimble, P Steinmetz, M McCrea; P Wallace, I Boss; B Young, R Best, D Fitzpatrick, J Harrison, R Caldwell, M McCullough, N Best, G Webb. Replacements: N Brady for Best, T Court for Fitzpatrick, N McMillan for Webb (all 58 mins); C Del Fava for Harrison (70 mins); N O'Connor for Steimetz, S Mallon for Bartholomeusz (both 72 mins); K Campbell for Boss (75 mins)
Referee: R Poite (FFR)