Furthermore, occasion means the immediate cause of the teaching.
That is twofold: general and particular.
There, the general is also twofold by division into internal and external.
There, the general internal occasion is the great compassion of the World-Protector.
For being urged by that, the mind of the Blessed One arose for teaching the Dhamma to those to be trained.
Referring to that it is said: "And having compassion for beings, he surveyed the world with the Buddha-eye" and so forth (Ma. Ni. 1.283; Saṃ. Ni. 1.172; Mahāva. 9).
And here the inclusion of great compassion should be seen even for the sake of ferrying beings across from the great flood of saṃsāra by the gift of true Dhamma teaching, just from its arising.
And just as great compassion, so omniscient knowledge, the knowledge of the ten powers, and so forth should be spoken of as being in the state of internal occasion for teaching.
For knowing truly all things to be known, the manner in which they should be taught, and the inclinations and underlying tendencies of beings, the Blessed One gave varied teachings in different ways suitable to the mental inclinations of those to be trained, with skill in what is fitting and unfitting.
But the external general occasion is the request of Sahampati Mahābrahmā accompanied by ten thousand Brahmās.
For after that request, having calmed the lack of concern born from consideration of the profundity of the Dhamma, the Lord of Dhamma became energetic for teaching the Dhamma.
The particular is also twofold by division into internal and external.
There, the internal should be understood as both that great compassion and that knowledge of teaching by which this discourse was given.
But the external is the arising of pride depending on learning of the five hundred monks of Brahmin birth, which is stated in the commentary itself.