Peter Grant kicked a penalty goal from the left touchline two minutes from the end as the Stormers beat the Sharks 15-12 in a Super Rugby match at Newlands on Saturday.
The Stormers overturned a 6-9 half-time deficit in a match decided on penalty goals.
Both teams made multiple errors and neither seriously threatened the opposition tryline, although the Sharks mounted some promising attacks in the first half.
Both teams missed several penalty chances. Stormers full-back Joe Pietersen landed three goals from seven attempts while Sharks fly-half Patrick Lambie succeeded with four from seven.
The only man with a perfect kicking record was fly-half Grant, who came off the bench less than a week after returning from club rugby in Japan and landed two out of two.
Stormers captain Jean de Villiers praised Grant's coolness under pressure.
"To come back here and get a kick from the touchline and slot it as though it was part of his routine shows his experience. To have someone like Peter come off the bench and make such a difference is just fantastic."
Sharks captain Keegan Daniel was the player who conceded the decisive penalty for going into a maul from the side.
"I thought the ball was out but the referee's decision is final," he said of referee Mark Lawrence's awarding of a penalty.
"Discipline is the key. We let ourselves down in key areas and that cost us the game."
Sharks looked the better team in the first half of a hard-fought South African derby, testing Stormers' defence by spreading the ball wide.
However, the Stormers dominated the second half, during which the visiting team conceded numerous penalties.
But with Pietersen missing two kickable penalties in quick succession before landing a goal that levelled the scores, the game was in the balance when Sharks lock Ross Skeate was sent to the sin bin in the 60th minute, providing Grant with the opportunity to put the Stormers ahead.
Lambie's fourth penalty made the scores even again with six minutes to go before Grant made his decisive strike.
It was the second successive win for the Stormers, who joined the table-topping Bulls and the Reds and Highlanders with two out of two, while the Sharks had to be satisfied with their second successive bonus point for a narrow loss.
STORMERS 15 (Joe Pietersen 3, Peter Grant 2 pens) def SHARKS 12 (Patrick Lambie 4 pens) Referee: Mark Lawrence (RSA)