By Martyn Herman

LONDON (Reuters) - Dominic Thiem stayed very much in the mix at the ATP World Tour Finals with a 6-3 1-6 6-4 victory over mercurial Frenchman Gael Monfils at the O2 Arena on Tuesday.

The Austrian weathered a mid-match storm when an apparently injured Monfils burst into life to play some audacious tennis and stayed solid through the decider to claim his maiden victory at the season-ending event.

It means the 23-year-old has won 22 of his 25 matches featuring a deciding set this year and he will go into his final Ivan Lendl group match against Milos Raonic on Thursday with a chance of reaching the semi-finals.

A match that kept a large afternoon crowd entertained was still in the balance until Monfils crumbled in the final game, serving three double-faults.

"It was a close match, the third set was very tight but luckily he helped me a little bit in the last game," Thiem, who will now definitely rise above absent Rafael Nadal to eighth in the ATP rankings, said.

Beaten by Novak Djokovic in his opening match, Thiem used his baseline power to boss the first set against an erratic opponent also making his long-awaited debut at the event.

But Thiem's best-laid plans were shredded as the contest took a wild turn when Monfils changed tactics and began to let rip with some fearsome ground strokes.

When Monfils served consecutive aces to level the match Thiem supporters might have feared the worst, especially after his capitulation against Djokovic when he managed only two games after winning the opening set.

However, he stuck to his task and got back on the front foot, keeping his nose ahead in a hard-fought third set.

The dexterous Monfils saved three break points at 3-4 but Thiem sealed his maiden victory at the event when Monfils crumbled at 4-5 and served three double-faults.

Monfils also lost to Canada's Milos Raonic in his opening match on Sunday and was hobbling at times, putting his continued participation in some doubt.

"Try to recover because obviously I'm not good enough to play back-to-back," the 30-year-old said. "Hopefully, I'll be much better."

Defending champion Djokovic and Raonic meet later on Tuesday with both looking to claim their second group victory.

Serbian Djokovic, bidding to reclaim the world number one ranking, leads 7-0 in their previous matches and an eighth win would guarantee his spot in the semi-finals.

(Editing by Ed Osmond)