Androcles and the Lion
Androcles was a runaway slave who took refuge in a cavern. A lion entered, and instead of tearing him to pieces, lifted up his front paw that Androcles might extract from it a thorn. The slave being subsequently captured, was doomed to fight with a lion in the Roman arena. It so happened that the same lion was let out against him, and, recognising his benefactor, showed towards him every demonstration of love and gratitude.
In the Gesta Romanorum (Tale civ.) the same story is told, and there is a similar one in Æsop's Fables. The original tale, however, is from Aulus Gellius, on the authority of Plistonices, who asserts that he was himself an eyewitness of the encounter.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Androcles and the Lion from Fact Monster: