NFL legend Ronnie Lott -- along with several huge sports stars -- was evacuated from a hotel in Sonoma, CA minutes before it was engulfed in flames ... TMZ Sports has learned.
Lott, Byron Scott, Bret Saberhagen, Dan Jansen and more were all in town for the UCSF Medical Center Celebrity Golf Classic ... when the raging fires in Northern California began to spread in their direction.
The majority of the VIP guests were staying at the Fountaingrove Inn in Santa Rosa -- and when the flames began to get close, officials ordered the hotel to evacuate the guests.
We're told all of the celebrities made it out of the hotel -- including Lott who posed for a photo in the parking lot of the hotel with a friend, his wife, Karen (brunette) and ex-MLB star Saberhagen.
It's a good thing they got out when they did ... the hotel caught fire and burned down a short time later, a UCSF spokesperson confirmed to TMZ Sports.
A witness at the hotel tells us the situation escalated so quickly, one guest jumped out of the hotel window and suffered a broken arm trying to escape.
The tournament has been scrapped -- and some of the guests have already returned home ... including Byron Scott who arrived to LAX early Monday morning.