Gavin Henson marked his return to rugby after a seven-week ban with 14 points in the Ospreys' dour Celtic League win over Borders at the Liberty Stadium.
Ospreys (9) 22
Pens: Henson (4)
Borders (6) 18
Tries: Weston, MacRae
Pens: Hore (2)
Playing at full-back, the Lions star gave a 100% kicking display and had a key role in the Ospreys' only try.
Andrew Bishop's 46th-minute try sealed the game, but the Borders fought back as Cai Griffiths was sin-binned.
Johnny Weston crossed, then - with Alun Wyn Jones also binned - Calum MacRae's last-minute try salvaged a bonus point.
It was that man Henson who opened the scoring after just two minutes with a simple 35m penalty.
The Ospreys' forward dominance saw them dominate territory, but general play was scrappy with numerous knock-ons.
That allowed Borders fly-half Charlie Hore to pin the home side back, and his two penalties put the Scots ahead.
But the Ospreys' pressure began to tell as Henson got his second penalty and Richie Pugh was just held up over the line.
Shaun Connor gave the home side the lead with a drop goal, but the stubborn Borders stopped another attack on the line on the stroke of half time to keep the gap to three.
A fine Henson run just after the break led to his third penalty ahead of the Ospreys' vital try.
Fine interplay by the home forwards freed the full-back, who glided down the wing before passing inside to Bishop for the score, Henson converting.
Stefan Terblanche went off with a worrying ankle injury, Adrian Cashmore's introduction at full-back prompting Henson to move to the centre with Bishop on the wing.
The Borders fought back bravely, the Ospreys flirting with the sin bin by repeatedly killing their attacking ball.
But it was Henson who hit his fourth penalty, before referee Alan Lewis' patience finally gave way and he sin-binned Griffiths.
Borders scrum-half Weston took advantage of the extra space, sniping from a ruck and having the speed to cross.
Substitute Wyn Jones' yellow card left the Ospreys with 13 men in the closing moments, and when the visitors spread it wide there was no-one to stop full-back MacRae gaining the Borders an important bonus point.
Ospreys coach Lyn Jones:
"We're happy with the win, but we just don't seem to be able to put teams away.
"Borders are a good team but we didn't play great rugby.
"It hasn't been a good season, but this is a step in the right direction and we'll keep plugging away."
Borders coach Steve Bates:
"We saw a lot of effort and commitment from the boys tonight to see them come back in the last few minutes.
"We competed well in the first half, but we just need to be a little more street-wise and capitalise on our opportunities when they are presented to us.
"We threw away a couple of opportunities in the second half, but if we had taken advantage of them we could have been scoring in injury time to win the game."
Ospreys: Henson, Terblanche, S. Parker, A. Bishop, Mustoe, Connor, Spice, Griffiths, Bennett, Millward, Newman, Bateman, Bater, Pugh, Thomas.
Replacements: Cashmore for Terblanche (54), Karauna for A. Bishop (76), Rees for Spice (79), Hibbard for Bennett (76), Wyn Jones for Newman (79), D. Dillon for Bater (59). Not Used: Mitchell.
Borders: MacRae, Moffat, MacDougall, Law, Walker, Hore, McKearchar, Thomson, Scott, Cross, MacLeod, Palepoi, Brown, Miller, Rennick.
Replacements: Weston for McKearchar (53), Dalziel for Rennick (43). Not Used: Kay, McGee, Parr, Blair, King.
Referee: Alan Lewis (Ireland).