The 64-year-old actor, who is known for his portrayal of Luke Skywalker in the original Star Wars trilogy, was asked by a female fan on Twitter whether it was okay for her to go to a comic con dressed as Luke Skywalker.
The fan added that she was planning to do so regardless.
Hamill responded by saying “Gender matters not when you're rocking the force like you are".
Hammill has amassed a following of more than 1.1 million followers on Twitter and is famed for directly interacting with his fans. He is also known to deliberately tease them on social media, taunting them with confusing hints about what might happen in Episode VIII.
Back in April, he announced to fans that Episode VIII's director Rian Johnson had given him the go-ahead to reveal a quick glimpse of the film's trailer.
But in actual fact, he meant “trailer” in the literal sense of the word, and shared a photograph of his on-set trailer.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies