Actor Josh Gad has become the latest celebrity to pen a heartwarming tribute to tragic funnyman Robin Williams after striking up an unexpected friendship with his comedy idol.

In a touching piece for newspaper USA Today, which was published on Wednesday (13Aug14), the Frozen star revealed he had looked up to Williams since he was a child, but it was the comic legend's ability to bring the Genie to life on the big screen in the 1992 animated Disney classic Aladdin which made him realise his own acting ambitions.

He later got the opportunity to meet the movie legend after performing on Broadway in hit musical The Book of Mormon in 2011, recalling the backstage visit from Williams was the start of a close friendship.

In a piece titled Olaf Remembers His Friend and Idol, the Genie, Gad writes, "It was always a thrill to look out in the audience and see a familiar face that had inspired me. But on this particular summer night, May 15 to be exact, I looked into the audience... and saw a bearded hero smiling back at me. That night, I gave what was probably the best performance I have ever given on a stage. I felt intoxicated with the knowledge that I was entertaining a man who had raised me on his comedy specials, his movies and his Tv series..."

Gad, who once lived in the same New York apartment building as Williams, went on to reveal that the two stars exchanged weekly notes while Williams was starring in a production of the drama Bengal Tiger at the Baghdad Zoo on Broadway, and the veteran sent his pal a bicycle as a gift when he moved from New York to San Francisco, California.

The Frozen star, who has previously discussed drawing inspiration from Williams' Genie for his own role as snowman Olaf in the 2013 Disney smash-hit, wrapped up his tribute by writing, "Olaf will never remotely touch the tour de force that is Robin's Genie. Because there is only one Robin Williams. But the joy and laughter that my little snowman has brought to children is because of the man who has left this world far too early. A man who taught me to be free, to be childlike, and a man who taught me to get out of my own way as a performer.

"His gift was to take all of our pain away and to allow us to escape. If only we could have returned the favor."

Williams died at his California home on Monday (11Aug14).