Complex sentence: The last phase or the fourth phase was from the later part Tang dynastic rule extending to the Northern Song Dynasty rule, which saw a decline in the creation of Grottoes and came to an end due to internecine war between the Jin and Yuan dynasties.
Split into simpler sentences: The last phase, which was the fourth, was from the later part of the Tang dynastic rule extending to the Northern Song Dynasty rule, which saw a decline in the creation of grottoes. It came to an end due to internecine war between the Jin and Yuan dynasties.