Question: who was the last ruler of the tang dynasty
Answer: In 907 the Tang dynasty was ended when Zhu Wen , now a military governor , deposed the last emperor of Tang , Emperor Ai of Tang , and took the throne for himself ( known posthumously as Emperor Taizu of Later Liang ) .