The imperial government’s position deteriorated after its surprising loss in the Sino-Japanese War of 1894-1895. In a settlement, China agreed to cede territory, including Formosa (present-day Taiwan), along with trading privileges, and pledged to pay Japan a large indemnity.