By Alasdair Fotheringham

ORIHUELA, Spain (Reuters) - Italian Alessandro Petacchi put his legal problems to one side to roar to a landmark 20th stage victory in the Tour of Spain on Friday.

The veteran Lampre rider accelerated away in a bunch sprint in Orihuela that decided the 187.1-km seventh stage.

Britain's Mark Cavendish finished second and Argentina's Juan Jose Haedo was third. Belgian Philippe Gilbert retained the overall lead.

Awaiting a verdict from Italy's anti-doping authority CONI over alleged links to a drugs probe, the 36-year-old Petacchi said it was a huge relief to win.

"I've spent more time in the last 25 days since the Tour de France with my lawyers than I have done with my family," he told reporters.

"It's been a really horrible period of my life and it meant I came to this race on the back foot. But at least I could turn it round today with a victory, one I really needed to get."

Petacchi was proud to record his 20th stage triumph in the Vuelta.

"I've taken 26 in the Tour of Italy, six in the Tour de France and 20 here, that's something that could inspire younger riders in the future," he said.

However, Petacchi added that Friday's win did not give him any extra confidence for the world championships in Melbourne on October 3.

"That is 260-km long, not 180, and the course is much tougher than today's," he said. "I've still got to improve a lot before I can be sure I'm going to do something there."

The Tour de France points classification winner said Friday's victory was built on good work by his leadout man, Danilo Hondo of Germany.

"Hondo brought me through a complicated chicane in exactly the right position and I was able to race away with 150 meters to go," said Petacchi.

The riders are set for a testing challenge in Saturday's mountainous stage to Xorret de Cati which ends with a brutally steep 4-km ascent and a fast drop to the finish.

The race concludes in Madrid on September 19.

(Editing by Tony Jimenez)