James Avery -- the beloved dad on "Fresh Prince of Bel Air" -- has died at age 65 .. TMZ has learned.
Sources close to the actor tell TMZ he died in an L.A. hospital last night. Avery had recently undergone surgery for an undisclosed illness and took a turn for the worse late yesterday.
And we're told ... his wife, Barbara, had been at his bedside but left for a short period of time to get something to eat. When she came back, she learned he had just died.
Alfonso Ribeiro -- who played Avery's son on "Fresh Prince" -- just posted a message on his Facebook page
Avery starred in dozens of TV shows through the years -- shows like "Grey's Anatomy," "The Closer," "L.A. Law," and "The Jeffersons." This past year, he appeared in three TV movies -- most recently, "Go, Bolivia, Go!" -- but didn't appear to have other projects in the works.