LOS ANGELES (AP) — A judge ended Lindsay Lohan’s supervised probation on Thursday, giving the actress her freedom after nearly two years of constant court hearings and threats of jail.

Lohan thanked Superior Court Judge Stephanie Sautner for her patience and let out a sigh of relief as she exited the courtroom after the brief hearing.

READ MORE: Five Puppies Rescued From Hialeah House Fire

The judge had imposed a series of strict probation requirements including cleanup duty at the morgue and counseling sessions last year, and Lohan met all the requirements by Thursday’s deadline.

“I just want to say thank you for being fair. It’s really opened a lot of doors for me,” the 25-year-old Lohan said.

Sautner told the problem-prone actress she was not going to give a lecture, but reminded her that she will remain on informal probation until May 2014 for taking a necklace without permission last year.

“You need to live your life in a more mature way, stop the nightclubbing and focus on your work,” Sautner said.

If Lohan does get into more trouble, she could face a 245-day jail sentence in the necklace case. The judge said she understood that Lohan may be frustrated with constant scrutiny by paparazzi and others, but noted, “That’s the life you chose.”

A probation report filed in the case noted that Los Angeles police are investigating a nightclub manager’s claims that Lohan struck him with her Porsche two weeks ago, but no charges have been filed.

READ MORE: Cast Iron Tub Falls Through Ceiling, Hits Three Firefighters Battling House Fire

The hearing came as Lohan’s career is showing hints of a comeback. She is due to guest star on an upcoming episode of “Glee,” recently hosted a highly rated but criticized episode of “Saturday Night Live” and is set to star as Elizabeth Taylor in a television movie.

“Lindsay is already talking about her next few projects,” her spokesman Steve Honig wrote in a statement after the hearing. “She is ready to start the next chapter in her life and get back to work and doing what she loves to do — making movies.”

Roles have been hard to come by for Lohan in recent years, as she has been in-and-out of courtrooms, spent time in rehab and was sentenced to jail.

Her failure to complete alcohol education classes in 2010 prompted a judge to sentence her to jail for the first time since the actress served 84 minutes for a pair of drunken driving arrests in 2007. A court-ordered rehab stint was cut short, but Lohan relapsed before year’s end and was sent by another judge to the Betty Ford Center, where she was involved in a fight with a rehab worker.

Within three weeks of her release in January 2011, Lohan was accused of stealing the $2,500 necklace from a store near her Venice home and soon landed in Sautner’s court. The judge rejected rehab and tried to send Lohan to jail as punishment. Overcrowding reduced a November 2011 sentence to a few hours, although the actress did serve 35 days on house arrest earlier in the year.

Lohan is far from the only celebrity to encounter trouble complying with the terms of alcohol-related cases and ending up in jail. Fellow female celebrities such as Paris Hilton, Nicole Richie and Khloe Kardashian have all been sentenced to jail and faced multiple court hearings because they didn’t properly comply with their sentences. All their cases have long since ended.

MORE NEWS: Miami-Dade Police Officer Not Injured After Coming Under Fire

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)