Oosthuizen shot a final round 71 to finish 16 under for the competition.
Rory McIlroy has finished with a closing 68 for 8 under overall.
That leaves the Holywood player in third position, behind Englishman Lee Westwood.
A final round 70 saw US Open winner Graeme McDowell end the tournament on three under par.
Darren Clarke of Dungannon closed with a 71 for level par.
"It's not going to give me nightmares," he said.
"I'm sure I'll wake up in the morning and just look the fact I was 16 under for three rounds of golf around St Andrews in the Open, and had just one bad round - it's fine.
"I couldn't help but think about it going up the last hole.
"You know, if I had just sort of stuck in a little bit more on Friday and held it together more, it could have been a different story.
"But the other three rounds I played very solidly.
"After that 80 I felt as if I came back well by shooting seven-under at the weekend."
McIlroy was keen to focus on the things he did well at the Home of Golf, especially as he could do very little about the weather conditions.
"You know, the game is there, and I can take a lot of positives out of this week," he added.
"I knew I had a good chance coming in here and it was nice to sort of be there for a while.
"I'm still a bit disappointed to be honest because I know if I could have played anywhere decent on Friday I could have been a lot closer to the lead.
"I'm not saying that I could have got to 17-under but I definitely could have been contending for second place.
"When you start off shooting 63 in any golf tournament, you fancy your chances going into the next three days.
"It just so happened to be it got very windy on Friday and I just didn't deal with it very well."
© UTV News