After giving up a three-shot lead, Jordan Spieth put together an incredible rally to win the British Open on Sunday.

Spieth shot a final-round 69 to beat playing partner Matt Kuchar by three shots at Royal Birkdale for his first Claret Jug. Spieth was 12 under for the tournament.

Spieth played the last five holes in 5-under-par.

He got off to a rough start, bogeying three of his first four holes. Then on the 13th hole a wild tee shot forced Spieth to take an unplayable lie. He hit his next shot from the driving range. His recovery shot got him just short of the green and he ended up bogeying the hole, giving Kuchar a one-shot lead.

On the next hole, Spieth almost holed his tee shot but made a birdie. An eagle from about 50 feet on the 15th hole gave the 23-year-old Texan the outright lead. He would go on to birdie the 16th and 17th holes.

With the win, Spieth has captured the third leg of a career grand slam, having won the 2015 Masters and U.S. Open. He shot 65 in Saturday’s round without a single bogey.