The Mahājanapadas were sixteen kingdoms or oligarchic republics that existed in Northern ancient India from the sixth to fourth centuries BCE during the second urbanization period.