It ended with China giving up its sovereignty over Annam and Tonkin.
The treaty ending the war was signed on June 9, 1885.
These territories were later included into French Indochina.
See also: Battle of Foochow