Developed in the 1830s and 1840s by Samuel Morse (1791-1872) and other inventors, the telegraph revolutionized long-distance communication. It worked by transmitting electrical signals over a wire laid between stations. In addition to helping invent the telegraph, Samuel Morse developed a code (bearing his name) that assigned a set of dots and dashes to each letter of the English alphabet and allowed for the simple transmission of complex messages across telegraph lines. In 1844, Morse sent his first telegraph message, from Washington, D.C., to Baltimore, Maryland; by 1866, a telegraph line had been laid across the Atlantic Ocean from the U.S. to Europe. Although the telegraph had fallen out of widespread use by the start of the 21st century, replaced by the telephone, fax machine and Internet, it laid the groundwork for the communications revolution that led to those later innovations.