In the 4th century BCE, the Mauryan emperor Chandragupta annexed Avanti to his empire. The edicts of his grandson Ashoka mention four provinces of the Mauryan empire, of which Ujjain was the capital of the Western province. During the reign of his father Bindusara, Ashoka served as the viceroy of Ujjain, which highlights the importance of the town. As the viceroy of Ujjain, Ashoka married Devi, the daughter of a merchant from Vedisagiri (Vidisha). According to the Sinhalese Buddhist tradition, their children Mahendra and Sanghamitra, who preached Buddhism in modern Sri Lanka, were born in Ujjain.