LONDON -- Andy Murray capped off the finest season of his career with two more significant feats.

In front of some of Hollywood's finest including Kevin Spacey, Clive Owen, Woody Harrelson and Jude Law, Murray charged to a 6-3, 6-4 win Sunday against Novak Djokovic to win his first ATP World Tour championship and secure the No. 1 ranking.

The match, between two players whose friendship goes back to their teenage years, when they grew up playing together at the Sánchez-Casal academy in Barcelona, lasted 1 hour, 42 minutes, and when it was over, Murray dropped his racket and put his hands on his head.

"It's something I never, never expected," Murray said in his on-court interview.

Djokovic gave him a warm embrace and some kind words at the net in a show of the enormous respect between them.

"Today we both were part of the history," Djokovic said. "It was an honor to be part of the big occasion. Andy's definitely No. 1 of the world. He's the best player. He deserved to win."

Andy Murray celebrates after beating Novak Djokovic for his first Tour Finals title and the year-end No. 1 ranking. GLYN KIRK/AFP/Getty Images

It was a career-best 24th straight victory and a fifth consecutive title for the Scot. In all, Murray won nine titles in a glittering season that also included a third major at Wimbledon and a second Olympic gold.

Murray became just the 17th different player in the history of the rankings to finish the season No. 1. He did it in a year in which his brother, Jamie Murray, finished No. 1 in the doubles rankings with partner Bruno Soares.

"It's been a tough rivalry with Novak," said Murray, who trails 24-11 in their head-to-head matches. "We've played Grand Slam finals, Olympics, matches like this. I've lost many of them. I'm happy I managed to get the win today and finish the year as No. 1."

Djokovic sprayed the court with unforced errors Sunday -- 30 in all -- while Murray rolled largely because of the impressive 84 percent of points he won on his first serve.

A fast start was key for Murray. Going into Sunday's meeting, Djokovic was 19-0 against the Scot when taking the first set.

Murray double-faulted twice in his first service game, and it looked like all that he had been through this week had taken its toll. The semifinal against Milos Raonic alone must have been an enormous drain on him physically and mentally. He spent a season-high (in a best-of-three match) 3 hours, 38 minutes on court Saturday, while Djokovic came through in 66 minutes in a blowout over Kei Nishikori.

"I felt tired. I slept well last night, but I didn't feel great this morning," Murray later told a news conference. "The practice, the warm-up for the match, I was hitting the ball fine, but just a bit sluggish, a bit heavy-legged.

"Thankfully the first sort of seven games of the match, there was no long rallies really at all, which for us is strange. Novak came out and served great his first couple service games. I got a lot of free points off my first serve, as well."

The body language was positive from Murray. After Murray missed two early break points in the sixth game of the match, the linesman failed to spot a double fault from Djokovic. Murray knew it was out but knew he could do nothing about it. He got his head down and kept at it.

Djokovic was hesitant to trade blows, and Murray was the one drawing mistakes. He took his third break point of the first set to open up a 5-3 lead and closed it out after 46 minutes when Djokovic reeled off his 11th unforced error.

He wasn't about to sit back. He broke immediately at the start of the second set and got the double break for 4-1. Djokovic just didn't look like he fancied it.

But the Serb was never going to take a hammering like this lying down. Murray finally faced his first break point after 78 minutes, and Djokovic managed to make it 4-2. He then caused Murray some anxiety by saving two match points, but the Briton took his third to make history.

Andy Murray swatted aside the challenge of Novak Djokovic. ADRIAN DENNIS/AFP/Getty Images

"It wasn't really until the middle of the second set when the rallies started to get extended and longer that my legs were starting to feel it," said Murray. "That's why it became harder, as well, to close the match out, because I knew that the longer the match went, the worse I was going to feel, and probably the better he was going to play, too.

"I was lucky I got it finished in two sets."

This was Murray's first win over Djokovic indoors, an illustration of how much work Murray has done in the gym the past few years.

He has found ways to get over hurdles throughout his career, and there has been none higher than toppling Djokovic, who held all four Grand Slams simultaneously after their last meeting in the French Open final on June 5.

Afterward, Murray said he was going to take two weeks off from tennis before starting preparation for the 2017 season.