The Collect for the 17th Sunday after Pentecost:
Da, quæsumus, Domine, populo tuo diabolica vitare contagia: et te solum Deum pura mente sectari. Per...
When that arch-heretic (but good translator) Cranmer was rendering this Collect (for the 18th after Trinity), this is what he brought forth (in the first, 1549 BCP, later reused in the 1552 and 1559), adding only "grace" to narrow down the exact way in which the Lord gives us to avoid diabolical contagions:
LORDE we beseche thee, graunt thy people grace to avoyde the infeccions of the Devil, and with pure harte and mynde to folowe thee the onelye God; Through Jesus Christ our Lorde.
The 1662 BCP modified Cranmer's original (1549, reused in the 1552 and 1559) by adding mention of Satan's little helpers, the world and the flesh, probably in reference to Cranmer's 1544 English Litany (the first of his productions), which had "from all the deceits of the world, the flesh, and the devil, Good Lord, deliver us." Italicizing the changes made, here is the Anglican collect, now happily seized back for Catholic use by Anglican-use Catholics:
Lord, we beseech thee, grant thy people grace to withstand the temptations of the world, the flesh, and the devil, and with pure hearts and minds to follow thee the only God; through Jesus Christ our Lord.
But why "the world, the flesh, and the devil"? It sounds Scriptural (and echoes I St John ii, 15-16; iii, 8), but so far as I have been able to establish, it derives instead from St Bernard who wrote De tribus inimicis hominis, carne, mundo, et diabolo (Of the three foes of man, the flesh, the world, and the devil) - and also referred to these three in his first sermon on the Canticle of Canticles. St Francis, St Thomas Aquinas, and various Protestant Reformers all quote it in later centuries, but until Cranmer's English Litany, the order was always "the flesh, the world, and the devil": Cranmer's prose thus gave birth to the expression in its present form.