Given the task definition and input, reply with output. In this task you will be given a text passage from a trivia quiz. You should choose the category this question belongs to from these categories: History, Science, Social Science, Fine Arts, Literature. You can only choose one category, so if in doubt, please choose the closest match.

During this dynasty, Prince Li Shimin ordered his brothers' deaths in the Xuanwu Gate Incident. One of its rulers' hatred of Yeon Gaesomun prompted one of its invasions of Goguryeo. This dynasty saw the appointment of jiedishi lords, a notable one of whom captured Luoyang in a power struggle with Yang Guozhong. The aftermath of that rebellion by An Lushan influenced Du Fu's poetry during this dynasty. One monarch of this dynasty apocryphally ordered court visitors to give oral sex and started out as one of Emperor Taizong's concubines. For 10 points, name this Chinese dynasty that succeeded the Sui and established a sprawling civil service under Empress Wu.
History