The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"No matter when or where."--This story was told by the Master while at Jetavana about another Brother who gave up persevering. But, in this case, he addressed that Brother and said, "Brethren, in bygone days the wise and good still persevered even when wounded." And, so saying, he told this story of the past.
Once on a time when Brahmadatta was reigning in Benares, there were seven kings who encompassed the city, just as in the foregoing story.
So a warrior who fought from a chariot harnessed two Sindh horses (a pair of brothers), and, sallying from the city, broke down six camps and captured six kings. Just at this juncture the elder horse was wounded. On drove the charioteer till he reached the king's gate, where he took the elder brother out of the chariot, and, after unfastening the horse's mail as he lay upon one side, set to work to arm another horse. Realising the warrior's intent, the Bodhisatta had the same thoughts pass through his head as in the foregoing story, and sending for the charioteer, repeated this stanza, as he lay:
The charioteer had the Bodhisatta set on his feet and harnessed. Then he broke down the seventh camp and took prisoner the seventh king, with whom he drove away  to the king's gate, and there took out the noble horse. As he lay upon one side, the Bodhisatta gave the same counsels to the king as in the foregoing story, and then expired. The king had the body burned with all respect, lavished honours on the charioteer, and
after ruling his kingdom in righteousness passed away to fare thereafter according to his deeds.
His lesson ended, the Master preached the Truths (at the close whereof that Brother won Arahatship); and identified the Birth by saying, "The Elder Ānanda was the king, and the Perfect Buddha was the horse of those days."