Five Jack Carty penalties sent Connacht through to the United Rugby Championship semi-finals with a 15-10 win over sloppy Ulster in Belfast.
The hosts staged a late rally, with captain Alan O'Connor scoring a converted try, but were made to pay for an ill-disciplined performance.
A John Cooney penalty opened the scoring for the hosts before Carty replied with four strikes.
O'Connor's try made it 12-10 before a late Carty penalty sealed victory.
Andy Friend's side, who finished seventh in the URC table after a poor start to the season, will travel to either the Stormers or Bulls, who face each other on Saturday, in the last four.
Friday night's victory also extends Friend's tenure as head of rugby in Galway, with the Australian having announced in November he would step away from his position at the end of this season.
For Ulster, meanwhile, it is the end of a campaign that supporters were beginning to hope would deliver a first piece of silverware since they won the Celtic League in 2006.
A victory over Connacht at the Kingspan would have set up another home semi-final after they finished second in the URC table, 18 points ahead of their victors.
The defeat came a day after the province announced that 10 players - including Rory Sutherland, Jeff-Toomaga-Allen and Duane Vermeulen, who all started on Friday night - would be leaving their squad.
While they did mount a fightback in the final 20 minutes, which had the vocal home crowd sensing a comeback win, the 60 minutes before were disjointed and disappointing.
The match was slipping away from them at 12-3 down when their renowned maul finally clicked into gear on 64 minutes, with substitute Tom Stewart being stopped with the ball before captain O'Connor picked up and drove over for an uplifting try that was converted by Cooney.
An excellent Rob Baloucoune break in the 68th minute was the closest they came to grabbing another try, but they allowed Connacht to turn the ball over again after the speedy wing was stopped.
Connacht take control after flat opening
After an opening 13 minutes during which neither side were able to mount an attack of any note, the match was sparked into life by a melee involving players from both teams that began with a clash between Cian Prendergast and Jeff Toomaga-Allen.
The visitors were playing their way into the game when centre Tom Farrell made an excellent break through the middle but, with scrum-half Caolin Blade to his side with a clear sight of the try-line, Farrell failed to release and was stopped by a Mike Lowry tackle.
However, it was the Ulster full-back's final contribution as he was forced off with a head injury and replaced by Stewart Moore.
McFarland's men then opened the scoring with their first real attack in the 21st minute when a Baloucoune run down the right helped lead to a penalty in front of the posts that was easily converted by Cooney.
A Sutherland infringement four minutes later let Carty draw the visitors level but two minutes after that Connacht lost Ireland wing Mack Hansen until half time when he was forced off after a clash of heads and replaced by Byron Ralston.
Friend's men refused to let that set them back and they capitalised on more Ulster sloppiness on 34 minutes with Carty slotting another penalty and the fly-half did the same on the stroke of half-time when Moore knocked on.
The second half was only four minutes old when Carty slotted his fourth penalty of the evening before Ulster fell short with their late rally.
Ulster: Lowry; Baloucoune, Hume, McCloskey, Stockdale; Burns, Cooney; Sutherland, Herring, Toomaga-Allen; O'Connor (capt), Treadwell; McCann, Timoney, Vermeulen.
Replacements: Stewart, O'Sullivan, Milasinovich, Carter, Murphy, Doak, Moore, Gilroy.
Connacht: O'Halloran; Porch, Farrell, Aki, Hansen; Carty, Blade; Buckley, Heffernan, Bealham; Murphy, Murray; Hurley-Langton, Oliver, Prendergast.
Replacements: Tierney-Martin, Duggan, Aungier, Dowling, Butler, Marmion, Daly, Ralston.