Ningbo was one of the five Chinese "treaty ports" opened by the Treaty of Nanjing (signed in 1842) at the end of the First Opium War between Britain and China. During the war, British forces took possession of the walled city of Ningbo briefly after storming the fortified town of Zhenhai at the mouth of the Yong River on October 10, 1841. The British repulsed a Chinese attempt to retake the city in the Battle of Ningpo on March 10, 1842. In 1864, the forces of the Taiping Rebellion held the town for six months. In March 1885, during the Sino-French War, Admiral Courbet's naval squadron blockaded several Chinese warships in Zhenhai Bay and exchanged fire with the shore defences.