PARIS (AP) — Novak Djokovic heads into the Paris Masters with his No. 1 ranking under serious threat from Andy Murray, and in the rare position of being second favorite.

Djokovic is looking to win the tournament for the fourth straight year and fifth time overall. But he has been in erratic form over the past few months and is not playing with the confidence he showed here last year, when he crushed Murray 6-2, 6-4 in the final.

On current form Murray has the edge, and the second-ranked Scot can overtake Djokovic if he wins and the Serb doesn't reach the final.

"You've got to give him (Murray) credit for what he's done in the last three or four months, the second part of the year is quite incredible," Djokovic told reporters Sunday on the eve of the tournament. "He's playing maybe the best tennis he's ever played, very consistent, very strong. He definitely deserves to be in the position of being No. 1 at the end of the year. But that doesn't just depend on him."

Djokovic guarantees to keep No. 1 if he reaches the final, and Murray is not overly optimistic of knocking him off his perch.

"Obviously he could win the event and, if I lose in the first round, then I am a long way from being No. 1," said Murray, who trails Djokovic 10-24 in career matches. "I've never won (the Paris Masters) before, so to just expect that you're going to win the tournament would be silly."

Murray won the Erste Bank Open in Vienna on Sunday for his third straight tournament win and career-high seventh of the year.

"In some other years, a year like this would easily (have) been enough to be No. 1 in the world," Murray said. "But I am obviously getting closer."

Murray, who has a first-round bye, will start his tournament against Spaniard Fernando Verdasco or Dutchman Robin Haase

Like Murray, Djokovic also has seven titles this year, matching his tally from 2013 and 2014, but will fall short of the 11 he won in an utterly dominant 2015.

The 29-year-old Djokovic owns a record 30 Masters titles. He is a 12-time Grand Slam champion and has won all four majors.

But after winning the elusive French Open for the first time in June, his form evaporated.

"Winning the French Open brought a lot of joy to me, but on the other hand has taken away a lot from me," he said. "I felt a little bit exhausted, I must say, and maybe less motivated. So I had to rediscover that feeling of being on the court and pushing myself."

He lost in the third round at Wimbledon to American Sam Querrey and in the first round to Juan Martin Del Potro of Argentina at the Olympic Games.

Although Djokovic won the first set in the U.S. Open final, Stan Wawrinka rallied to beat him.

At the Shanghai Masters two weeks ago, Djokovic lost 6-4, 6-4 in the semifinals to Spaniard Roberto Bautista Agut, an opponent he had beaten in five previous meetings.

"The last couple of months were not easy," Djokovic said. "Mentally I just had to redefine my goals, things that are happening on and off the court."

Djokovic clearly needed to gather his thoughts.

"It's important to take time," he said. "Really understand what the next step is going to be, professionally, privately."

He feels much better now.

"I feel great and rejuvenated, very happy to be back in the city where I have wonderful memories," he said. "It gives me a lot of emotions and butterflies in my stomach when I think about the last time I was here."

Djokovic, who also won here in 2009, faces either Nicolas Almagro of Spain or Gilles Muller of Luxembourg in the second round.

Milos Raonic, who also has a first-round bye, is still feeling the effects of ankle injury that forced him to withdraw ahead of his China Open semifinal three weeks ago.

"It's a partial tear," said the big-serving Canadian. "It's still a little bit of an issue ... I tape it up to limit how much my ankle can move."

_

Associated Press writer Eric Willemsen in Vienna contributed to this report.