Play video content EXCLUSIVE LA-OC.TV

1:35 PM PT -- Will and his colleague, Andrew Steele, were unhurt in the accident and have been released from an Orange County hospital ... according to United Talent Agency. Ferrell’s longtime driver, Mark Thompson, and another colleague, Carolina Barlow, remain hospitalized but are in stable condition.

We're told Will is staying close to his friends' sides as they get treatment, and he thanks everyone involved in responding to the accident and providing care ... as well as those who sent well wishes.

8:21 AM PT -- Law enforcement sources tell TMZ ... the SUV was sideswiped from the right rear by a Toyota, causing the SUV to spin and flip over. We're told drugs and alcohol did not play a role in the accident. No one was arrested and cops continue investigating.

7:40 AM PT -- Will's rep tells us he's been released from the hospital and is doing well. He did not suffer any significant injury.

Will Ferrell was riding in an SUV that got flipped over in a 2-car accident Thursday night, and he -- along with 2 others -- were rushed to a hospital for treatment.

The wreck happened in Orange County on the I-5 freeway around 11 PM. Will was one of 3 passengers in the chauffeur-driven SUV. Witnesses tell us they got side-swiped by another car.

Play video content TMZ.com

It's unclear what injuries Will suffered ... he was speaking on his phone as firefighters loaded up his stretcher to take him to the hospital. One witness said a woman in Will's vehicle was more seriously injured, and was bleeding profusely on the scene.

Open beer bottles were seen on the road after the SUV was pulled upright. It's not clear which vehicle they came out of ... and police have not said if alcohol played a factor in the accident.

Play video content ONSCENE.TV