Du Fu was born in Gongyi City, Henan Province in 712. In 746, he took the official examination in Chang'an (now known asXi'an) and continued to live there for more than ten years after the failure. But, in order to get away from the An-Shi Rebellion breaking out in 758, he fled to Chengdu in 759. With the help of friends, the thatched cottage was built in 760 beside the Flower Bathing Brook on the western outskirts of Chengdu. During the four years stay there, he composed more than 240 poems that are considered to be precious national treasures.