Sthulabhadra Jain temple in Patna/ Ghosh Ujjwal via Wikimedia Common
On the death of great Jain saint Bhadrabahu, the First Jain Council was called by the Jaina monk Sthulabhadra at Patliputra. At this great council, the twelve Angas or sections, the sacred cantons of the Svetambaras, were compiled which replaced the fourteen former Jaina texts (Purvas).
The Second Jaina Council was held in Valabhi in Saurashtra (Gujarat) in the 5th century AD under the leadership of Devardhi Kshamasraman. At the council, the Oral Jain traditions of the Svetambaras were finally reduced to writing in the form of twelve Upangas or minor sections, and various lesser sections.