In 750, Nanzhao invaded the Tang dynasty. In retaliation, the Tang sent an army against Nanzhao in 751, but this army was soundly defeated at Xiaguan. In 754, another army was sent, this time from the north, but it too was defeated. Bolstered by these successes, Nanzhao expanded rapidly, first into Burma, then into the rest of Yunnan, down into northern Laos and Thailand, and finally, north into Sichuan. In 829, Chengdu was taken; it was a great prize, as it enabled Nanzhao to lay claim to the whole of Sichuan province, with its rich paddy fields.