The Brāhmī alphabet is the ancestor of most of the 40 or so modern Indian alphabets, and of a number of other alphabets, such as Khmer and Tibetan. It is thought to have been modelled on the Aramaic or Phoenician alphabets, and appeared in India sometime before 500 BC. Another theory is that Brāhmī developed from the Indus or Harappa script, which was used in the Indus valley until about 2,000 BC. The earliest known inscriptions in the Brāhmī alphabet are those of King Asoka (c.270-232 BC), third monarch of the Mauryan dynasty. Brāhmī was used to write a variety of languages, including Sanskrit and Prakrit.