Crafty Connacht dented Border Reivers' quest to claim a top-five Celtic League finish as they snatched their second triumph on the trot at Netherdale.
Border Reivers (9) 9:
Pens: MacRae, King
Drop goal: Townsend
Connacht (11) 11:
Pens: Slemen (2)
David Slemen put the Irish visitors ahead with a penalty before Calum MacRae replied and Gregor Townsend put the Scots in front with a drop goal.
Flanker John Muldoon scored the game's only try to put Connacht ahead again.
Slemen added another penalty, while James King replied for Reivers, who were unable to avoid a bad home defeat.
Neither side had been able settle into a rhythm in inhospitable conditions that made fast-flowing rugby a virtual impossibility.
The bulk of the action was confined to the area between the 22-metre lines as mistakes were made at every turn.
Connacht broke the deadlock in the ninth minute with a solidly struck penalty by stand-off Slemen after the Reivers had crept offside in defence.
Reivers gradually took a measure of control - but still without looking likely to make decisive inroads.
But they did edge ahead with two pinpoint kicks in quick succession.
MacRae slotted a penalty for offside and then veteran playmaker Townsend stroked over a drop-goal when he was short of options 25 metres from the target.
Connacht hit back to set up a breakaway touchdown before the half ended in controversy.
Muldoon was the scorer, following a quick recycle in the wake of a great challenge by Nikki Walker on Mark McHugh.
Then a Reivers assistant coach was given a stern warning by Welsh referee James Jones as he protested a yellow card shown to Semo Sititi.
There was still time for Slemen to trade penalties with rookie King, who had come on as a blood substitute for MacRae.
Borders were forced to reshuffle their line-up after the restart, when winger Simon Danielli crashed into an advertising board.
Scott Gray came off the bench to join the pack, with Kelly Brown moving out to the wide position, but the Borders were unable to overcome the two-point deficit.
Border Reivers: Moffat, Danielli, MacDougall, MacRae, Walker, Townsend, McKearchar, Thomson, Scott, Douglas, MacLeod, Palepoi, Brown, Sititi, Miller.
Replacements: Gray for Danielli (55), Weston for McKearchar (60), McGee for Thomson (70), Dalziel for Sititi (60). Not Used: Kay, Cross, King.
Connacht: Tries: Muldoon. Pens: Slemen 2. Connacht: Mostyn, Yapp, Mailei, McHugh, McPhillips, Slemen, Keane, Hogan, Fogarty, Clarke, Gannon, Farley, Muldoon, Rigney, Lacey.
Replacements: Williams for Yapp (34), Warwick for Slemen (40), Merrigan for Fogarty (55), Knoop for Clarke (55). Not Used: Short, Swift, O'Loughlin.
Referee: J Jones (RFU)