Several European Union countries tightened border controls after Thursday’s terror attack in France in moves that further erode free travel across the bloc which was already curtailed by last year’s migration crisis and earlier terrorist atrocities.

Germany, Spain and Italy bolstered security along their borders with France following the attack in the southern French city of Nice, which killed at least 84 people. A 31-year-old Tunisian who lived in Nice drove a truck into people who had gathered to watch the fireworks for...