Fly-half Mike Hercus starred with 14 points, the USA international playing a part in his side's two first-half tries for Lee Byrne and Regan King. The latter was the hammer blow to the Ospreys, Dafydd James sparking a break out from turnover ball in his own 22.
The visitors were on top in the tight and came back with a Stefan Terblanche try but missed kicks cost them a bonus. Gavin Henson - starting at fly-half in a late team change due to Shaun Connor's calf injury - opened the scoring with a first-minute penalty, but he was at fault for the opening try.
Hercus ghosted beautifully between the Wales man and Des Dillon before floating a pass to Byrne, giving the wing the space to cross. Byrne then charged down a Henson kick and a furious Scarlets attack looked certain to yield a try, but Hercus' long, scoring pass to James was adjudged forward.
The Ospreys had been forced offside, though, and Hercus landed a simple penalty. A fine Leigh Davies midfield break and Ian Evans's good line-out work set up the position for Henson's second penalty, to the dismay of the sell-out Stradey Park crowd.
In a physical battle, Byrne - rumoured to be on the move to the Ospreys in the summer - went off with a worrying leg injury and Richie Pugh made way for James Bater.
The Ospreys' scrum dominance helped secure two long-range penalties, but both Henson's efforts went astray and when his team infringed at the breakdown Barry Davies slotted a 40m shot. As the penalty count mounted, John Davies was harshly sin-binned for a push when he felt Sonny Parker had late-tackled Hercus.
Henson's third kick brought it back to 11-9, and his back-line promptings seemed set to win their reward, but a Scarlets turnover was moved quickly to James, who went on a 50m run from his own 22, before feeding inside to Hercus who sent King under the posts for a superb score.
Hercus missed a simple kick to extend that lead straight after the break, and Davies failed with another long-range effort before knocking over a 52m shot.
The Ospreys at last gathered themselves for a multi-phased attack, and when home captain Easterby killed the ball five metres from his line he was sent to the sin bin. The Scarlets looked like weathering the storm, but a poor Hercus kick set up a sustained attack from the visitors that ended with Terblanche scoring in the corner.
Hercus and Henson exchanged penalties, before the Scarlets man hit a fine drop goal. That took the gap to 10 points, and Henson missed a late shot at goal that could have given his side a losing bonus point.
It was left to Hercus to have the final say, landing his third penalty with the last kick of the game.