Forgiveness of Sins for Those Who Die in Battle With the Heathen (9th century)
Leo IV (847-855): "Now we hope that none of you will be slain, but we wish you to know that the Kingdom of Heaven will be given as a reward to those who shall be killed in this war. For the Omnipotent knows that they lost their lives fighting for the truth of the faith, for the preservation of their country, and the defence of Christians. And therefore God will give them the reward which we have named."
John VIII (872-882) to the bishops in the realm of Louis II [the Stammerer]: You have modestly expressed a desire to know whether those who have recently died in war, fighting in defence of the church of God and for the preservation of the Christian religion and of the state, or those who may in 'he future fall in the same cause, may obtain indulgence for their sins. We confidently reply that those who, out of love to the Christian religion, shall die in battle fighting bravely against pagans or unbelievers, shall receive eternal life. For the Lord has said through his prophet: "In whatever hour a sinner shall be converted, I will remember his sins no longer." By the intercession of St. Peter, who has the power of binding and loosing in heaven and on the earth, we absolve, as far as is permissible, all such and commend them by our prayers to the Lord.
(From Migne, Patrologia Latina, 115: 656-657, 126: 816, and 161:720. The original postings are at the Internet Medieval Sourcebook.)