When William Walker, an American filibuster, attempted to invade Costa Rica in 1856, the Costa Rican government declared war. However, the march from the Costa Rican military base in San José to the northern border was an arduous one. Le Lacheur put his ships at the disposal of the Costa Rican military commanders to transport the army up the coast to the border so that they would arrive fit and ready to fight. As a result, they successfully repelled the filibusters.