By 1862 the war was over and Vietnam conceded three provinces in the south, called by the French Cochin-China, opened three ports to French trade, allowed free passage of French warships to Cambodia (which led to a French protectorate over Cambodia in 1867), allowed freedom of action for French missionaries and gave France a large indemnity for the cost of the war.