Mark Hamill will once again play farm-boy-turned-Jedi Luke Skywalker in the upcoming Star Wars: The Last Jedi, but about eight years ago, he reprised his role for another, more emotional reason — to visit with a terminally ill fan.

On Monday, screenwriter Ed Solomon (who’s best known for writing Men in Black and Bill & Ted’s Excellent Adventure) shared the moving story of how Hamill once went above and beyond to meet a dying boy who dreamed of meeting Luke Skywalker in person.

“When a friend’s son (who was, so tragically, dying from an incurable illness) made a wish: to meet Luke Skywalker, it fell on me — the only person the dad knew who worked in the film business — to make a call,” Solomon wrote on Twitter.

“Not knowing Mark,” he continued, “I called his agent and explained that this lovely boy watched Star Wars every day and wanted to meet NOT Mark Hamill, but, rather, the actual CHARACTER that he played (the boy’s own mental state had devolved past the point of being able to grok that Luke was fictional). The agent begrudgingly said he’d call Mark, but also said not to get my hopes up. 90 seconds later I got a call from @HamillHimself, who immediately said yes and gave me his home address.”

The next day, Hamill paid them a visit.

“He not only met with the boy, but spent hours answering question after question (sometimes the same ones repeatedly), AS ‘Luke,’” Solomon added. “Even posting this now makes me teary. He was compassionate, kind, and patient. And it literally meant the world to this kid and his family.”

Solomon and the boy’s father, Joe Sikorra, elaborated on the meeting with Hamill in an interview with The Hollywood Reporter. Sikorra told THR his son John was diagnosed with juvenile Batten’s Disease and died in 2015 at the age of 23.

“Mark was just super patient and kind,” Sikorra said. “It was one of those beautiful experiences. It is very humbling, this disease. You have got to let go of your normal expectations for you and your kids and family. In the midst of struggle and tragedy, it was those points of connection that makes you feel loved and less isolated. Mark was very kind, ‘no rush, my time is your time.'”

Solomon added that Hamill also put him in touch with Carrie Fisher, who also agreed to visit John — but unfortunately, John’s condition worsened before the two could meet.

Solomon’s story quickly spread on Twitter, and before long, Hamill himself saw his tweets and responded.

“There’s no sweeter sound than a child laughing,” Hamill wrote. “I’ve been so lucky – feel it’s my duty 2 give back in any way I can – Much prefer visits 2 hospitals than talk-shows. Heartbreaking but inspirational – makes my career seem trivial in comparison – Wish I could do more.”

Star Wars: The Last Jedi will hit theaters Dec. 15.