The British “Red Flag Act”—officially, the Locomotive Act of 1865—was a 19th century British law that dealt with vehicular traffic.
It required all automobiles to observe a speed limit of 2 m.p.h. within the city. (In the country, they could travel at twice that speed, at 4 m.p.h.)
To that effect, a man carrying a red flag would walk 60 feet ahead of a car or a lorry, so as to restrict its speed to that of the man. His other responsibility was to alert horse carriages to the presence of passing motorized traffic.