Dennis Rodman says he played a crucial role in bringing imprisoned American Kenneth Bae back home from North Korea ... because he begged Kim Jong Un for the guy's release -- and he's got proof.
Rodman tells TMZ ... he sent a letter to the dictator back in January after returning home from the DPRK ... pleading with Un to let Bae return home so the Worm could go back to North Korea without getting bashed.
In the letter, Dennis states, "I understand the crimes [Bae] committed, and ask you my dear friend, the highly respected Marshall Kim Jong Un for his release to show my country how loving and compassionate you and the DPRK can be."
Rodman continues, "I ask for your mercy to prisoner Kenneth Bae and would be eternally grateful for his safe return and make a big step towards bridging the gap between our two nations."
According to reports ... Bae is currently on his way home -- after the North Korean government contacted U.S. officials out of the blue saying they'd discuss his release. He'd been held there for 2 years, 7 months.
Dennis says he never heard back after sending the letter ... but the North Korean government released a video showing Bae was alive days later -- and Dennis doesn't think it was a coincidence.
Dennis tells TMZ, "No doubt, our trips helped influence Kenneth Bae's release and I'm happy he is coming home safely."