The Song Dynasty ruled China from 960 to 1229 CE. Geographically, China contained deserts, mountains, plains, and rivers suitable for only 10% of farming. Politically, the Song established a merit-based bureaucracy but faced threats from northern tribes. Technologically, the Song saw improvements in agriculture, proto-industrialization, gunpowder, printing, and shipbuilding. Culturally, Confucianism and Buddhism flourished with the spread of philosophy and medicine through printing. Economically, the Grand Canal and Silk Roads supported trade in porcelain, tea, and silk.