information:highlighting, structural:scholar_edition, information:filtering, structural:expansion, quality:correction
Federal support

Morse made his last trip to Washington, D.C., in December 1842, stringing "wires between two committee rooms in the Capitol, and sent messages back and forth" to demonstrate his telegraph system. Congress appropriated $30,000 (equivalent to $981,000 in 2023) in 1843 for construction of an experimental 38-mile (61 km) telegraph line between Washington, D.C., and Baltimore along the right-of-way of the Baltimore and Ohio Railroad. An impressive demonstration occurred on May 1, 1844, when news of the Whig Party 's nomination of Henry Clay for U.S. president was telegraphed from the party's convention in Baltimore to the Capitol Building in Washington.

On May 24, 1844, the line was officially opened as Morse sent the now-famous words, " What hath God wrought," from the Supreme Court chamber in the basement of the U.S. Capitol building in Washington, D.C., to the B&O's Mount Clare Station in Baltimore. Annie Ellsworth chose these words from the Bible (Numbers 23:23); her father, U.S. Patent Commissioner Henry Leavitt Ellsworth, had championed Morse's invention and secured early funding for it. His telegraph could transmit thirty characters per minute.

In May 1845, the Magnetic Telegraph Company was formed in order to build telegraph lines from New York City toward Philadelphia, Boston, Buffalo, and the Mississippi. Telegraphic lines rapidly spread throughout the United States in the next few years, with 12,000 miles of wire laid by 1850.

Morse at one time adopted Wheatstone and Carl August von Steinheil 's idea of broadcasting an electrical telegraph signal through a body of water or down steel railroad tracks or anything conductive. He went to great lengths to win a lawsuit for the right to be called "inventor of the telegraph" and promoted himself as being an inventor. But Alfred Vail also played an important role in the development of the Morse code, which was based on earlier codes for the electromagnetic telegraph.