A 1975 adventure film based on the story and directed by John Huston, stars Sean Connery as Daniel Dravot and Michael Caine as "Peachy" Carnahan.
Warning: Wikipedia contains spoilers
When they arrive, the natives confuse their Masonic medals for symbols of Alexander the Great and declare the men to be gods. They live the life of gods for a time until they are found out and all ends badly for them.
In the film, the natives decide that Connery's character is a god after he is shot with an arrow in the chest but continues fighting (the arrow strikes a bandolier beneath his clothing and is lodged in it; the character is unaffected). The natives, much later, decide the man is not a god after he is bitten by his bride, who fears marrying a god.
Huston had originally planned to make the film with Humphrey Bogart and Clark Gable. It was filmed on location in Morocco.
Kipling's original story now appears to be imperialist at least; in Huston's telling, both East and West have their faults and virtues.
The film is the only occasion in which these two giants of modern British cinema have appeared on film together. They both starred in A Bridge Too Far but did not share any scenes together.