The first traffic light appeared in 1908
New timeline: There was one as far back as 1868
The first traffic light, in 1868, outside the Houses of Parliament in London, was gas, and it was operated by a policeman next to it. It organized otherwise chaotic horse and cart traffic, prior to automobiles entirely.
“Stop” was still red.
The first one blew up though, per a gas leak.