Complex sentence: Thiruvarur was a part of Thanjavur district till 1991 and Nagapattinam district until 1997; it became the headquarters of Thiruvarur District when it was carved out of Nagapattinam district in 1997.
Split into simpler sentences: Thiruvarur was a part of Thanjavur District till 1991 and Nagapattinam District until 1997. Thiruvarur became the headquarters of Thiruvarur District when it was carved out of Nagapattinam district in 1997.