Britain's Andy Murray reacts while playing against Serbia's Novak Djokovic during the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Darron Cummings)

Britain's Andy Murray poses with the trophy after beating Serbia's Novak Djokovic in the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. His considerable lead, and a chance at history, slipping away, Murray dug deep for stamina and mental strength, outlasting Djokovic in a thrilling five-set U.S. Open final. (AP Photo/Charles Krupa)

A trainer works on Serbia's Novak Djokovic during his match against Britain's Andy Murray during the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. Djokovic lost the match. (AP Photo/Charles Krupa)

Serbia's Novak Djokovic argues a call while playing Britain's Andy Murray during the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Mike Groll)

Britain's Andy Murray, left, poses with the trophy after beating Serbia's Novak Djokovic in the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Julio Cortez)

Serbia's Novak Djokovic reacts after falling while playing Britain's Andy Murray during the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Darron Cummings)

The New York City skyline is seen from the Arthur Ashe Stadium during the championship match between Serbia's Novak Djokovic and Britain's Andy Murray at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Julio Cortez)

Serbia's Novak Djokovic reacts while playing against Britain's Andy Murray during the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Kathy Willens)

The championship match between Britain's Andy Murray and Serbia's Novak Djokovic is shown on a big screen as the sun sets behind the New York City skyline at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. (AP Photo/Julio Cortez)

Britain's Andy Murray poses with the trophy after beating Serbia's Novak Djokovic in the championship match at the 2012 US Open tennis tournament, Monday, Sept. 10, 2012, in New York. Murray vs. Djokovic was a test of will as much as skill, lasting 4 hours, 54 minutes, tying the record for longest U.S. Open final. (AP Photo/Charles Krupa)

NEW YORK — His considerable lead, and a chance at history, slipping away, Andy Murray dug deep for stamina and mental strength, outlasting Novak Djokovic in a thrilling five-set, nearly five-hour U.S. Open final Monday.

It had been 76 years since a British man won a Grand Slam singles championship and, at least for Murray, it was well worth the wait.

Ending a nation’s long drought, and snapping his own four-final skid in majors, Murray finally pulled through with everything at stake on a Grand Slam stage, shrugging off defending champion Djokovic’s comeback bid to win 7-6 (10), 7-5, 2-6, 3-6, 6-2.

“Relief is probably the best word I would use to describe how I’m feeling just now,” Murray said, adding: “You do think: Is it ever going to happen?”

Yes, Murray already had showed he could come up big by winning the gold medal in front of a home crowd at the London Olympics last month. But this was different. This was a Grand Slam tournament, the standard universally used to measure tennis greatness — and the 287th since Britain’s Fred Perry won the 1936 U.S. Championships, as the event was known back then.

“He deserved to win this Grand Slam more than anybody,” Djokovic said of Murray, who will rise to No. 3 in the rankings behind No. 1 Roger Federer and No. 2 Djokovic.

Murray vs. Djokovic was a test of will as much as skill, lasting 4 hours, 54 minutes, tying the record for longest U.S. Open final. The first-set tiebreaker’s 22 points set a tournament mark. They repeatedly produced fantastic, tales-in-themselves points, lasting 10, 20, 30, even 55 — yes, 55! — strokes, counting the serve. The crowd gave a standing ovation to salute one majestic, 30-stroke point in the fourth set that ended with Murray’s forehand winner as Djokovic fell to the court, slamming on his left side.

“Novak is so, so strong. He fights until the end in every single match,” Murray said. “I don’t know how I managed to come through in the end.”

But as the finish approached, Djokovic — who had won eight consecutive five-set matches, including in the semifinals (against Murray) and final (against Rafael Nadal) at the Australian Open in January — was the one looking fragile, trying to catch breathers and doing deep knee bends at the baseline to stretch his aching groin muscles. After getting broken to trail 5-2 in the fifth, Djokovic had his legs massaged by a trainer.

“Well, any loss is a bad loss. There is no question about it,” Djokovic said. “I’m disappointed to lose the match, but in the back of my mind I knew that I gave it all. I really, really tried to fight my way back.”

No one had blown a two-set lead in the U.S. Open title match since 1949, and Murray was determined not to claim that distinction.

When Djokovic sent a forehand long on the final point, Murray crouched and covered his mouth with both hands, as though even he could not believe this moment had actually arrived. The 25-year-old Scot took off his sneakers, grimacing with each step as he gingerly stepped across the court. Djokovic came around to offer congratulations and a warm embrace, while “Chariots of Fire” blared over the Arthur Ashe Stadium loudspeakers.

Murray was one of only two men in the professional era, which began in 1968, to have lost his first four Grand Slam finals — against Djokovic in the 2011 Australian Open, and against Federer at the 2008 U.S. Open, 2010 Australian Open and this year’s Wimbledon.

The other guy who began 0-4? Ivan Lendl, who just so happens to be Murray’s coach nowadays. Murray’s forehand is one of the improvements he’s made under the tutelage of Lendl, who sat still for much of the match, eyeglasses perched atop his white baseball hat and crossed arms resting on his red sweater — in sum, betraying about as much emotion as he ever did during his playing days.

During the post-match ceremony, Murray joked about Lendl’s reaction: “I think that was almost a smile.”

The lack of a Grand Slam title for Murray, and for his country, has been the subject of much conversation and consternation in the United Kingdom, where the first of what would become tennis’ top titles was awarded at Wimbledon in 1877.

Djokovic, in contrast, was bidding for his sixth major trophy, fifth in the past two seasons. He had won 27 Grand Slam hard-court matches in a row.

Murray and Djokovic were born a week apart in May 1987, and they’ve known, and competed against, each other since they were about 11. Before Saturday’s semifinals in New York, they shared a computer and sat together to watch online as Murray’s Scotland and Djokovic’s Serbia played to a 0-0 draw in a qualifying match for soccer’s World Cup.

It was windy at the start Monday, gusting above 25 mph, and Murray dealt with it much better. Djokovic admitted after his semifinal that he was bothered by heavy wind while falling behind 5-2 in the first set Saturday; that’s when play was suspended until the next day, the reason the tournament finished on a Monday instead of Sunday for the fifth consecutive year. Murray faced similar conditions in the semifinals — when a changeover chair skidded onto the court as he served one point — and joked after that victory that growing up in wind-whipped Scotland helped.

Murray had plenty of noteworthy fans in the stands Monday, including a pair of Scots who crashed his news conference after that semifinal: actor Sean Connery and Manchester United manager Alex Ferguson. The last British woman to win a Grand Slam singles title, 1977 Wimbledon champion Virginia Wade, also was present, chatting between games with actor Stanley Tucci.

With the air carrying balls and making them dip or dart this way and that, nearly every shot became a bit of an adventure. Both players repeatedly needed to adjust mid-swing, contorting their bodies simply to make contact. Both let service tosses fall to the ground because the ball would move out of hitting range. As the wind wrapped around the chair umpire’s microphone, it made a loud, distracting sound that resembled thunder.

“We both did a lot of running. It was unfortunate really to not be able to come up with big shots at the right time. It forced me to go for winners or mistakes,” Djokovic said. “Unfortunately I did a lot of mistakes.”

He totaled 65 unforced errors to Murray’s 56; they combined for 49 more unforced errors than winners. That said, there probably should have a statistic to count wind-forced errors.

They traded nearly mirror-image breaks in the first two games, and that made sense, given how good both are at returning serve. Two of the best in the game right now, maybe ever. Djokovic crouches low, his back nearly parallel to the ground, before an opponent serves. Murray shuffles his weight from leg to leg and hops forward at the last second to cut off angles.

Both worked hard, the physical nature taking a toll. Djokovic’s right knee was bloodied after he scraped it during a few tumbles to the court when he lost his footing, and he switched shoes late in the third set. Murray clutched his left thigh while deciding not to chase a lob.

There were 10 points of at least 10 strokes each in the first-set tiebreaker, which lasted 25 minutes. Djokovic saved each of Murray’s initial five set points, the last with a 123 mph ace to make it 10-all. But Djokovic’s backhand flew long at the end of a 21-shot exchange to cede set point No. 6, and this time Murray converted, hitting a 117 mph serve that Djokovic couldn’t put in the court.

Murray turned toward his guest box and bellowed, “Come on!”

That loss to Federer in this year’s Wimbledon final left Murray in tears, his voice cracking as he told the supportive Centre Court crowd, “I’m getting closer.” He appeared to be really, really close Monday, after seizing that epic first set and then racing to a 4-0 lead in the second.

But Djokovic is nothing if not tenacious, and he would not go quietly. Raising his level of play as Murray took a step or two backward, Djokovic broke for 4-1 and then again when Murray served for a two-set lead at 5-3. That’s when Murray made three unforced errors, truly showing some jitters, as though the prospect of such prosperity was a tad overwhelming.

When Djokovic held to 5-all, it seemed as though the second set might head to a tiebreaker, too.

But with Djokovic serving while trailing 6-5, he was the one who faltered. On a 31-stroke point, Djokovic missed a forehand to make it 15-30. Then Murray’s defensive skills came into play, as he got one overhead back and forced Djokovic to hit a second, which sailed wide. Chest heaving, Djokovic put his hands on his hips, having a hard time understanding what was happening. Two points later, Djokovic pushed an inside-out forehand wide, giving Murray that set. Even Lendl rose to his feet.

Djokovic, though, knows how to fashion a comeback. He’s won three times after facing a two-set hole, most recently in the French Open’s fourth round this year, and most notably in the U.S. Open’s semifinals against Federer last year.

“If I had lost this one from two sets up,” Murray said, “that would have been a tough one to take.”

After stretching for a backhand volley winner to hold at 1-1 in the third, Djokovic let out a guttural yell and pumped his fists. Across the net, Murray frowned and shook his head. In the very next game, as Murray kept up a monologue of self-admonishment, Djokovic kept up his better-late-than-never charge. He broke for a 2-1 lead, turning on a 126 mph serve with a terrific return. Soon enough, they were headed to a fourth set.

Djokovic held onto the momentum there. He secured a break point by tapping the ball over the net with the lightest caress, then took four steps, raised his right fist and yelled. There was more punching of the air and screaming seconds later after a volley winner put Djokovic ahead 1-0.

The sun was setting, the match was approaching 3Â½ hours, and it was apparent that Murray was now tentative and in some trouble.

“At some point, it’s going to come down to who wants it more or how badly do you want it,” Lendl said. “I don’t want to say Novak didn’t want it. But it’s: How bad do you want it? What price are you going to pay and how can you execute under extreme pressure?”

Making a key tactical move, Djokovic pushed forward at nearly any opportunity, shortening points and grabbing easy volleys wherever he could. He ended up winning the point on 39 of 56 trips to the net; Murray was 16 of 24.

A critical moment came with Djokovic facing a break point that could have let Murray pull even in the fourth set. After Murray missed a forehand to make it deuce, chair umpire Jake Garner warned Djokovic about taking too much time between points. A discussion ensued, and after winning the next point with a service winner, Djokovic sent a “Take that!” stare in Garner’s direction. In the stands, Djokovic’s father stood up and glared at Garner. Djokovic held to go ahead 3-1 and eventually forced the fifth set.

Murray nosed ahead quickly, breaking for a 1-0 lead when his shot ticked off the net tape, throwing off Djokovic, who missed a backhand then smiled a wry smile of disbelief, shaking his head. Murray walked to the changeover chomping on a white towel.

It was a 2-0 lead for Murray soon thereafter, as he pounded a 131 mph service winner and then used some terrific defense to stretch a point until Djokovic missed again. Murray screamed and pumped his arms, and the spectators, sending something special, responded with a roar.

Murray broke again to go ahead 3-0 and was on his way.

Federer, Djokovic and Nadal — who missed the U.S. Open with a left knee injury — had won 29 of the previous 30 major tournaments (the exception: Juan Martin del Potro in New York in 2009).