Thiruvananthapuram is an ancient region with trading traditions dating back to 1000 BCE. It is believed that the ships of King Solomon landed in a port called Ophir (now Poovar) in Thiruvananthapuram in 1036 BCE. The city was the trading post of spices, sandalwood and ivory. However, the ancient political and cultural history of the city was almost entirely independent from that of the rest of Kerala. The early rulers of the city were the Ays. Vizhinjam, which is now a region in the present-day Thiruvananthapuram, was the capital of the Ay dynasty. Vizhinjam was an important port city from as early as 2nd century BC. During the Ay dynasty rule, Thiruvananthapuram witnessed many battles in which the Chola and Pandyan dynasties attempted to capture the port town. After the death of king Vikramaditya Varaguna in 925 AD, the glory of the Ays departed and almost all their territories became part of the Chera dynasty. During the 10th century, the Cholas attacked and sacked Vizhinjam and surrounding regions. The port in Vizhinjam and the historic education center of Kanthalloor Sala were also destroyed by Cholas during this period. A branch of the Ay family, which had controlled the Padmanabhaswamy Temple, merged with the Kingdom of Venad in the 12th century.