Krayzie Bone says he spent 9 days fighting for his life in a hospital ... literally.
The Bone Thugs-N-Harmony rapper just posted a picture from his hospital bed on social media, and he's thanking God for being alive.
Krayzie says ... "Just fought for life Literally for 9 days straight. And I only won the battle this time because I know Jehovah God was with every step of the way fighting for me."
As we reported ... Krayzie needed at least two surgeries to address internal bleeding, which he now says was threatening his life.
KB was hospitalized last month after he started coughing up blood ... so doctors ran some tests and discovered a bleeding artery in one of his lungs ... and he twice went under the knife.
When Krayzie was in the hospital, tons of celebs and sports figures wished him the best ... and he says he's thankful for all the prayers.
Krayzie concludes ... "Never take life for granted enjoy it while have you have it! Thank you all for your thoughts and prayers trust me I needed every last on [sic] of them."