Brooks Koepka managed to retain his US PGA Championship title, but only after a dramatic collapse on the back nine at Bethpage Black.

Leading by seven heading into the final round, Koepka closed out a two-stroke victory for his fourth major title on Sunday.

The American bogeyed five of seven holes on the back nine and his lead was briefly cut to one by Dustin Johnson in a thrilling finish.

Here's how a dramatic back nine unfolded in New York:

- Leading by four with nine to play, Koepka enhanced his position with a magnificent birdie on the fearsome 10th, enough to move him six clear as Johnson bogeyed 11.

- Loose drives prevented Koepka from reaching the 11th and 12th greens in regulation and back-to-back bogeys cut his advantage to four.

- Koepka then pulled his tee shot way left on the par-five 13th, before missing a short par putt to drop another shot.

- Up ahead, Johnson birdied the 15th for the fourth day in succession. Suddenly, the 2016 U.S. Open champion was only two behind.

- The drama intensified as Koepka's run of bogeys stretched to four at the short 14th. After over-shooting the green, he played a heavy-handed chip and could not salvage par.

- Johnson failed to keep the pressure on, going long with his approach to 16 and then failing to get up and down. Koepka's lead was back to two.

- A poor tee shot on the par-three 17th led to another Johnson bogey, seemingly ending his challenge. A super up-and-down at the last meant he avoided another dropped shot and finished on six under.

- Koepka took a two-stroke lead to the final tee after dropping his fifth shot in seven holes at the 17th.

- Another poor drive led to Koepka laying up with a pitch back into the fairway, but he got the job done thereafter, pitching to six feet and holing out for par.