SAN FRANCISCO (Reuters) - A northern California teenager was sentenced to life plus 21 years in prison on Thursday for attempted murder and an elaborate heist of a Lamborghini owned by celebrity chef Guy Fieri, an attorney for the defendant said.

Max Wade, 19, from the San Francisco Bay-area town of San Rafael, was sentenced to life with a possibility of parole for shooting into a truck carrying his former love interest and her boyfriend in April 2012, his attorney Charles Dresow said.

The life term came with a 20-year sentencing enhancement for use of a firearm in committing a premeditated attempted murder, and he received a separate 16-month sentence for stealing the sports car, Dresow added.

Under a new state law for individuals who commit a crime as juveniles but are convicted as adults, Wade would be entitled to a parole hearing after serving 20 years, and has earned two year's credit for time already served, the defense lawyer said.

Judge Kelly Simmons, who presided over the jury trial that found Wade guilty late last year, handed down the sentence in Marin County Superior Court.

"He deserves it," Simmons said in the sentencing hearing, according to the San Francisco Chronicle. "The crime was very, very serious. This is not a spur-of-the-moment loss of temper. This is a planned act."

Wade was 17 when he was arrested for the drive-by shooting north of San Francisco. He allegedly sped off on a motorcycle after firing shots at the teen couple, who were uninjured in the attack.

A model stands beside the Lamborghini Gallardo LP 560-4 Spyder during the North American International Auto Show in Detroit, Michigan January 12, 2009. REUTERS/Mark Blinch While investigating the shooting, authorities linked Wade to an unsolved car theft the year before, where witnesses reported seeing a man rappel from the roof of a San Francisco auto dealership and race off in a Lamborghini Gallardo Spyder owned by Fieri, the goateed, spiky-haired Food Network restaurateur.

Video cameras captured the canary yellow convertible crossing the Golden Gate Bridge days later.

The sports car, estimated to cost about $200,000, was discovered in a storage shed along with Wade's getaway motorcycle.

Police said they staked out the storage space and arrested Wade when he showed up to retrieve his belongings.

He was taken into custody in May 2012. On his 18th birthday, someone unsuccessfully attempted to free Wade from a juvenile detention center by smashing his cell window from the outside. Wade was immediately transferred to county jail after the breakout effort.

A search of the grounds around the juvenile hall turned up a backpack with a change of clothes, a sledgehammer and a bolt cutter, which authorities believe was used to slice through two perimeter fences.

Wade's friends were thought to have made the botched escape attempt.

(Reporting by Laila Kearney; Editing by Steve Gorman and Lisa Shumaker)