The Sino-French War was originally not a direct conflict between France and China. The premise of the war was that France wanted control of Vietnam, which was a Chinese tribute state at the time. The Chinese rushed to the defense of their colony, but could not provide much of a defense against the French army. Unlike the English in the Opium Wars, the French were not without their losses, and they lost one of their main generals, Henri Rivière. This prompted the French into anger and they pushed forward, claiming Vietnam in the Treaty of Huế.
However the Chinese were not all in full agreement with the treaty, and soon after the conclusion of the battle in Vietnam, they attacked the French without any notice. The French retaliated and attacked China, destroying the Chinese. With the impending threat of a Japanese-French alliance, China accepted the Treaty of Tientsin, which granted more land to the French as well as trade freedoms.