Seven shots ahead at the start of play, six shots ahead after 10 holes, one shot up on the 15th tee. Brooks Koepka opened US PGA Championship week by insisting majors were the easiest tournaments to win. “You think so, do you?” came the belated response from the golfing gods.

It seems astonishing that Koepka’s successful defence of the Wanamaker Trophy was ever in doubt. Yet in doubt it was as a supposed formality lurched towards disaster.

The 29-year-old was in grave danger of delivering one of the worst capitulations in major history during a Sunday afternoon run in which he bogeyed four holes in a row from the 11th. “DJ, DJ” chanted the crowds, in applying cruelty to an already fraught scene for Koepka. As he wobbled, Dustin Johnson, playing ahead of him, appeared in the rear-view mirror. The only thing missing was a reading of the typically unflappable Koepka’s heart rate.

Koepka was to prevail, by two at eight under par, which left one pondering what all the earlier fuss was about. Johnson, having reduced that pre-round advantage by six, dropped shots on the 16th and 17th. Koepka’s par on the 15th stopped the bleeding. His missed par putt from 4ft at the penultimate hole did not matter. Koepka took to the 18th with a two-shot lead and managed to fall over the line in the manner of a broken marathon runner from there.

Koepka has now won four majors in eight starts and the space of 23 months. He is again the world’s top ranked player. Bizarrely his major tally is double that in standard PGA Tour events, bearing out his earlier remark.

Brooks Koepka with the Wanamaker Trophy for a second successive year. Photograph: Tannen Maury/EPA

A relieved Koepka said: “I am just glad we didn’t have to play any more holes. That was a stressful round of golf. The wind was up, DJ was awesome but I’m glad to have this trophy back in my hands. I don’t even know if I dreamed of this. I’m still in shock.”

Johnson will be criticised by some for blinking just when Koepka’s grasp on the trophy had been weakened. At least Johnson made it interesting. He was the only one of the final 24 players in the field under par for his round. Johnson’s 69 afforded him a four-stroke cushion from those tied third.

There had been no indication of the potential for epic theatre. Koepka supplied one of the shots of the tournament when 157 yards from the 10th hole. A tap-in birdie as Johnson bogeyed up ahead at the 11th meant Koepka had half a dozen strokes to play with. The champion’s shell-shocked face when walking from the 14th green did not suggest he had been of a mind to use every one of them. We shall never know how Koepka would have responded had Johnson played his last three in level as opposed to two over.

Dustin Johnson was the only player to seriously challenge Koepka but two bogeys in the last three holes scuppered his chances. Photograph: Justin Lane/EPA

Jordan Spieth’s 71 meant he shared third with Patrick Cantlay and Matt Wallace. “I’m very happy,” said Spieth. “This is the best I’ve felt in a while.” Luke List’s 74 ensured sixth, one ahead of Sung Kang.

Harold Varner III, who partnered Koepka, indicated he might be of a mind to alter history as he birdied the 1st. That proved as good as it got for Varner; he wheeched an iron shot from thick rough on the 4th so badly he lost his ball. Varner signed for an 81 which meant a tie for 36th.

There is a reasonable theory that how good a golfer is can be best assessed by his results when short of their best. Rory McIlroy had his B or C game for much of this championship but still finished tied eighth. McIlroy signed off with a 69 before assessing how Koepka can elongate his stunning level of success. “I don’t really know Brooks that well. I don’t know his routines,” McIlroy said.

“When you start to win majors and you start to get all these opportunities... You have to make the most of those, as well, because at the end of the day, we’re here to make a living and have a livelihood and enjoy ourselves, but at the same time you have to make sure that your performance stays where it needs to stay.”

Moronic antics of spectators, fuelled in part by drinking on empty heads, were all too common here. McIlroy returned a diplomatic “no comment” when asked what the Bethpage atmosphere might be like for the 2024 Ryder Cup.

If, as is to be expected, the level of rowdiness from this event is ramped even higher for the meeting of the US and Europe, there may be a problem. One wonders how many major triumphs Koepka will have on his CV by then or, indeed, how many times he will encounter such a dramatic denouement.