Necessity is the mother of invention, or so the (historically difficult to attribute) saying goes. In one famous case, however, necessity had passed, and the parent of this particular invention was remorse or, perhaps, the hope that nothing of the sort would happen again. That invention? The Morse telegraph.

Samuel Morse was born in 1791 in Charlestown, Massachusetts. His father, a Calvinist pastor, invested in his education at a young age, and Samuel ended up attending Yale University, from which he graduated in 1810. During his time at Yale, Samuel Morse painted; his paintings were so good, he was able to sell many as a way to earn a living while studying. After graduation, he was invited to continue his studies — as an artist — at the Royal Academy of Art in London. His first great work, Dying Hercules (seen above), was the first of many which would establish him as a budding superstar in the art world at the time.

By 1816 he was invited to paint a portrait of former president John Adams (seen here) and in 1825, the city of New York commissioned him to create one of Marie Joseph Paul Yves Roche Gilbert du Motier, better known as the Marquis de Lafayette. That painting was an honor for Morse, and it paid well — $1,000, or nearly $20,000 in today’s equivalent — but it turned out to be a curse of sorts as well.

While Morse was in Washington, D.C. painting Lafayette’s portrait, his wife and mother of their three children, Lucretia, fell ill. But Lucretia was back in New Haven, Connecticut, where Morse then lived. Morse’s father sent him a message — per Wikipedia, the entirety of the message was “Your dear wife is convalescent.” But the message came by horse, and by the time it reached Morse and he could get back to New Haven, it was too late. Lucretia had died and was already buried.

Over the next decade, Morse would slowly transition from a life as an artist to one as an innovator in the world of electromagnetism. According to About.com, in 1832, while traveling back from Europe, he found himself in a conversation about the alacrity with which electrical signals travel over wires. He soon realized that this could be used as a way to send messages, in real-time, over long distances — a solution which would prevent other husbands from falling the same fate he did with his late wife. By 1837, he had developed the telegraph, and with his unheralded assistant Alfred Vail, Morse Code. (This telegraph was not the first, however; British inventors created similar devices a few months before Morse did. But Morse did invent his independently and without knowledge of the others.)

On January 11, 1838, the Morse sent the first telegram in the United States, over a two mile long wire in New Jersey. By December of that year, he gave up painting altogether, focusing on his new invention. He would spend the next decade travelling around the United States and Europe, demonstrating his invention, obtaining various patents, raising capital for the expansion of telegraph wires, and promoting the development of infrastructure for its use.

Bonus fact : In 1845, Morse’s invention finally achieved its intended purpose — getting a message to the intended recipient when time was of the essence. A woman named Sarah Hart was found murdered in her home in the UK town of Slough, outside of London. The assumed culprit was a man named John Tawell, a married man with whom she was having an affair. Tawell fled by train to London, and would have likely escaped — except that authorities used Morse’s invention to send a message ahead, describing the accused. Tawell was apprehended, convicted, and ultimately, hanged; he is widely considered to be the first criminal apprehended due to advancements in telecommunications.

From the Archives: Senior Citizen: Why Lafayette’s American legacy will last for generations — guaranteed by the state of Maryland.

Related: A Morse Code box kit.