qnli question: Who performed the tasks of the Zongli Yamen before it was created? sentence: It was not until 1861 — a year after losing the Second Opium War to the Anglo-French coalition — that the Qing government bowed to foreign pressure and created a proper foreign affairs office known as the Zongli Yamen.