Three gatherings that recited the canon and settled it, a hundred and sixty, eight hundred and thirty, and nine hundred and eighty years after Mahāvīra — the last of them the one that wrote it down.
The canon was carried in memory, and three times the order gathered to recite and settle it. At Pāṭaliputra, about a hundred and sixty years after Mahāvīra, under Sthūlabhadra, after a twelve-year famine had scattered the monks: the eleven aṅgas were compiled, and the twelfth could not be, because Bhadrabāhu, who alone knew it whole, was away.
At Mathurā under Skandila and at Valabhī under Nāgārjuna, in the same years — about 827 to 840 after — two recensions were settled at once, and their differences are still noted in the manuscripts. And at Valabhī again, 980 or 993 after, under Devarddhi Kṣamāśramaṇa: the whole was written down, and the oral age ended. The years are the tradition's; no council is dated in the canon itself.
The canon: what survived, and what was lost — The three councils highlighted