Following actions taken by predecessors, the Nguyễn dynasty turned to China for aid. Unsurprisingly, the French took action first in order to avoid being boxed out of north Vietnam.[14] In 1882, a French naval captain named Henri Rivière repeated Garnier's feat of taking Hanoi.