The history of level crossings depends on the location, but often early level crossings had a flagman in a nearby booth who would, on the approach of a train, wave a red flag or lantern to stop all traffic and clear the tracks. Gated crossings became commonplace in many areas, as they protected the railway from people trespassing and livestock, and they protected the users of the crossing when closed by the signalman/gateman. In the second quarter of the 20th century, manual or electrical closable gates that barricaded the roadway started to be introduced, intended to be a complete barrier against intrusion of any road traffic onto the railway. Automatic crossings are now commonplace in some countries as motor vehicles replaced horse-drawn vehicles and the need for animal protection diminished with time. Full, half or no barrier crossings superseded gated crossings, although crossings of older types can still be found in places. New technology is advancing to create new ways of protecting the railway from users of a level crossing, with one of the most recent being obstacle detection scanners fitted to some crossings in Europe.