ABU DHABI, United Arab Emirates (AP) — After nearly losing his right hand, Robert Kubica could be steering a Formula One car with it next year.

If he returns it will complete a remarkable comeback for the 32-year-old Polish driver, rated as one of the quickest in F1 before a gruesome rally accident left him needing seven hours of surgery on a partially severed right hand, and numerous subsequent operations.

Kubica did F1 testing for Renault earlier this season and recently with the Williams team, and is consideration for an F1 seat in 2018.

No announcement is planned during this weekend's Abu Dhabi Grand Prix, Williams says. But in what appears to be a boost for his ambitions, Williams announced Wednesday that Kubica will take part in Pirelli tire testing after the race.

Those tests are aimed at evaluating tires, but it gives driver further time behind the wheel before Williams decides.

It was his love of all racing that pushed Kubica into trying rallying six years ago, and it almost ended his career. After crashing at a little-known Italian rally in February, 2011, he was trapped in the wreckage of his battered Skoda for more than an hour and also sustained arm and leg fractures.

"The accident turned my life upside down, but I'm aware that a few centimeters more and I wouldn't be here talking about it," Kubica said. "The biggest job I had to do was in my own head. There were some terrible times when I no longer felt up to it. It was worse than a physical pain."

Initially, he cut all ties with F1.

"I never wanted to visit a Grand Prix paddock or attend a test, despite being invited," Kubica said.

Stark realization was setting in.

"Life had given me so much and then in an instant, it (almost) took it all away," Kubica recently told the official magazine of the FIA, the governing body for auto racing. "They say that time is a healer but that wasn't the case for me — it made me suffer more."

That was until he accepted his situation.

"The brain can develop the ability to compensate, at least partly, for one's physical limits," he said. "It's difficult to explain something like this — only those who have experienced it can really understand."

A popular driver in F1 from 2006-10, Kubica earned 12 F1 podium finishes and was considered among the brightest talents.

"Not a lot of great, great drivers come through," four-time F1 champion Lewis Hamilton said. "Then you have real special drivers like him."

Kubica won the Canadian GP driving for BMW Sauber in 2008, after placing second at the Monaco GP. He was reportedly close to joining Ferrari in a move that would have offered him a better title shot.

Even if he never races in F1 again, his comeback from that crash is already impressive. Two years later, he won the WRC2 title — rally's second-tier championship.

This year he has edged closer to F1.

When he tested for Renault on Valencia's Ricardo Tormo circuit in June, albeit in an older and lighter F1 car, he was overwhelmed.

"I don't get emotional easily but that day I really did," he said. "I realized that driving a Formula One car was the thing that made me happy and I finally felt at peace."

When he tested in the 2017 car at the Hungaroring for Renault in late July, just outside of Budapest, he was fourth quickest and completed 142 laps. It proved his fitness was OK and that he retained some speed from his F1 days.

It wasn't quite enough to convince Renault, which has since signed promising Spanish driver Carlos Sainz Jr.

But Williams needs a replacement for 36-year-old Brazilian driver Felipe Massa, who is retiring after Sunday's season-ending race.

One of the main problems is that the weight of the 2017 F1 car — heavier than in recent years — puts greater strain on Kubica's fragile right arm.

Williams is not giving anything away, saying only that "although conversations are ongoing with Kubica, it is still yet to be finally decided who will replace Massa."

British driver Paul Di Resta, who previously raced in 59 GPs with Force India, is also being considered.

Kubica has good backing, since he is being managed by 2016 F1 champion Nico Rosberg, and is highly regarded.

"Robert is one of the quickest drivers I've ever raced against," Hamilton said. "Raw, natural talent. If he was still racing today he'd been in contention for a world title."