"Leave him! I said. I never mean to. I am going with him, if he climbs to the Moon; and if any of those Black Riders try to stop him, they’ll have Sam Gamgee to reckon with, I said."
During the First World War, officers in the British Army were assigned a servant from amongst the soldiers, called a soldier-servant or batman
. The batman would carry his officer’s messages, run errands, carry and maintain his equipment, act as a personal bodyguard, and cook meals. Sam can be seen as fulfilling the role of Frodo’s batman, looking after his master with great loyalty and affection. In a personal letter, Tolkien confirmed that he was influenced by his observations of batmen during his service in the First World War:
“My Sam Gamgee is indeed a reflection of the English soldier, of the privates and batmen I knew in the 1914 war, and recognised as so far superior to myself” (The Letters of J.R.R. Tolkien, ed. Humphrey Carpenter).