(CNN) -- Tiger Woods, in clear agony after his recent left knee operation, completed a staggering U.S.Open victory on Monday by defeating fellow-American Rocco Mediate in a marathon playoff at Torrey Pines.

Tiger Woods is closing in on Nicklaus' record 18 major victories after his marathon win over Rocco Mediate.

On the very day he reached 500 weeks as world number one, Woods took his total of majors to 14 -- just four short of Jack Nicklaus's record -- on the first sudden-death hole, after both players had carded level-par 71s in Monday's 18-hole playoff

After staying alive with a 15-foot putt on Sunday, Woods again birdied the last to stop 45-year-old qualifier Mediate becoming the championship's oldest-ever winner.

Mediate, who himself had fought back from three down after 10 holes to lead by one on the final tee, then bogeyed the first extra hole of sudden death to hand Woods victory.

Earlier, it looked like the momentum had swung the way of Mediate, world ranked 158th coming into the tournament.

After Woods had bogeyed the 11th and 12th, Mediate birdied the next three and went one ahead. The last of those was with a 25-foot downhill putt after the 13-major winner had conjured up a magical recovery from a bunker on the wrong hole.

Woods, having missed from 12-feet there, almost made a 50-footer on the next and could not convert a 22-foot chance at the 17th.

Mediate, though, opened the door by driving into a bunker on the last. He had to lay up short of the water, whereas twice champion Woods hit a three-iron onto the green and two-putted.

Sudden death began on the seventh hole and there it ended as well when Mediate was in a bunker, missed the green and failed to get up and down.

In his first event since surgery on his left knee straight after the Masters in April, Woods made it a remarkable five straight victories at the San Diego venue and took his on-course career earnings through the $100 million mark.

"The whole week was unbelievable," said Woods. "The golf course was set up so fair but so difficult, everybody who has come out this week has been fantastic, the fans have made the tournament.

"Today was unreal, it kept ebbing and flowing, Rocco looked like he was in control, then I did, it was back and forth, back and forth and 18 holes wasn't enough.

"Three shots on this golf course isn't much. I was slapping it around and I just wanted to get the ball on the green, Rocco made three birdies in a row and that run was impressive."

Asked about the problems he had had throughout the tournament with his knee, Woods added: "I'm glad I'm done, I really don't feel like playing any more.

"The atmosphere kept me going, it could have been very easy to quit, but I couldn't quit in front of these people, it wasn't going to happen."

Asked when he would play again, Woods said: "Not for a while, I'm going to shut it down for a little bit and see what happens."

Mediate admitted his best had not quite been good enough. He said: "Tiger is so hard to beat, he's unreal. I would have loved to have won, it was a great day.

"The crowd was unbelievable, the putt I made at 18 just to stay in it -- I handled it, I was nervous as a cat but I handled it.

"I can't really complain, I did the best I could. It just showed me that I can still compete. I got what I wanted, a chance to beat the best player in the world and I came up just short."