Kosala was an ancient Indian kingdom, corresponding roughly in area with the region of Oudh. in what is now south-central Uttar Pradesh state, it extended into present-day Nepal. Its capital was Ayodhya. In the 6th century BC it rose to become one of the dominant states in northern India. Kosala formed one of the sixteen powerful realms of India (Mahajanapadas) of Buddhist traditions, and its cultural and political strength earned it the status of great power. The kingdom of Magadha conquered Kosala by c. 459 BC, and it became known as Northern Kosala to distinguish it from a larger kingdom to the south known variously as Kosala, Southern Kosala, or Great Kosala. Kosala was the setting of much Sanskrit epic literature including the Ramayana. Buddha and Mahavira taught in the kingdom. King Pasenadi was the king of Kosala, which was north of Magadha ruled by King Bimbisara. The capital of the kingdom of Kosala was called Savatthi. One of King Pasenadi's sisters was the chief queen of King Bimbisara, which made him the brother-in-law of King Bimbisara.