Exclusive Details

12:37 PM -- John's family tells TMZ the famed director suffered a stroke Wednesday while at the hospital. He's currently in the ICU and under great medical care. The family adds, "We ask that privacy be given to him and our family at this time and appreciate all of the prayers that have been pouring in from his fans, friends and colleagues."

John Singleton has suffered a stroke ... family members tell TMZ.

The legendary director and screenwriter is in the hospital ... we've learned he checked himself in earlier this week after experiencing weakness in his leg. A family member tells TMZ, John had flown back from Costa Rica and the plane flight may have triggered the medical emergency.

We're told doctors are performing tests and also doing rehab. The stroke was described to us as "mild."

As you know, Singleton is iconic in the entertainment industry ... hitting like thunder with his directorial debut ... "Boyz n the Hood" back in 1991. He was nominated for 2 Oscars -- Best Director and Best Original Screenplay. He was the youngest filmmaker to get nominations in the 2 categories.

He had close ties with the Jackson family, directing Michael Jackson's music video, "Remember the Time" and directing Janet Jackson in "Poetic Justice." His other credits include "Rosewood," "Shaft," "2 Fast 2 Furious," and "Four Brothers."

Singleton received accolades for directing "The People vs. OJ Simpson: American Crime Story," "Empire," and "Billions."

Waiting for your permission to load the Instagram Media.

Snoop Dogg is asking people to pray for John.

John has been teaching at his alma mater recently ... USC Film School. He's teaching a course titled "Film and Culture."

Play video content 7/18/18 TMZ.com

The 51-year-old also co-created "Snowfall," which chronicles the crack epidemic in the 1980s in Los Angeles.