If you were sitting at a desk in 1769 and made a mistake in pencil, you’d reach for a piece of bread. Not to eat — to erase.

For centuries, the standard way to undo a pencil mark was a ball of moist, crustless bread. Writers and artists across Europe and Asia rolled the soft interior into a wad and rubbed it against the page. The bread picked up the graphite, the page came clean, and you were left with a slightly gray lump of dough that you probably shouldn’t have in your desk drawer to begin with. It worked, mostly. The bread had to be fresh and slightly damp — stale bread just smudged things around — and it wasn’t especially precise. But it was cheap, plentiful, and it beat the alternative, which was either living with your mistake or scraping the page smooth with a piece of pumice stone.

In Meiji-period Tokyo, students were given bread specifically for this purpose. One student recalled being issued erasers without restriction on quantity, which he and his classmates naturally interpreted as permission to eat most of them. “We thought nothing of taking these and eating a firm part to at least slightly satisfy their hunger,” he wrote. The eraser doubled as lunch. The system had, arguably, two problems.

Then, in 1770, an English engineer named Edward Nairne reached for his bread eraser and accidentally grabbed a piece of rubber instead.

Nairne was a scientific instrument maker — he built compasses, telescopes, the kind of precision work that demanded clean lines and careful corrections. He’d been selling bread erasers at his shop, keeping a lump of the stuff on his desk alongside the various materials he worked with. The rubber he grabbed was raw latex, a material that had recently arrived in Europe from South America under the name caoutchouc, borrowed from the Quechua word for the rubber tree. Nobody in England was quite sure what to do with the stuff yet. It was too soft, too perishable, too weird.

But when Nairne rubbed it against his paper, it erased better than anything he’d tried before. The rubber grabbed the graphite cleanly, didn’t leave crumbs, and didn’t rot on his desk. He started selling rubber erasers at his shop — three shillings per half-inch cube, which was steep enough that most people stuck with bread. But it worked, and word got around.

One of the people who noticed was Joseph Priestley — the same Joseph Priestley who discovered oxygen, invented carbonated water, and generally had a talent for stumbling onto important things. On April 15, 1770, Priestley included a footnote in a book about perspective drawing: “I have seen a substance excellently adapted to the purpose of wiping from paper the mark of black-lead-pencil.” He noted that the substance was sold by Mr. Nairne, Mathematical Instrument-Maker, opposite the Royal Exchange. Then Priestley named it. The stuff required rubbing to work, so he called it a “rubber.”

That footnote is the first recorded use of the word “rubber” for the material we now associate with tires, gloves, and, yes, erasers. The name started as a description of an action — rubbing — and attached itself to the material instead of the tool. By the time Charles Goodyear figured out vulcanization in 1839 (another accident — he dropped a rubber-sulfur mixture on a hot stove), rubber had become durable enough to be practical, and the eraser became a household object.

The raw rubber Nairne sold had a shelf life problem. It crumbled, it rotted in heat, and it smelled terrible. Vulcanization fixed the durability, but it took another two decades before someone thought to attach the eraser to the pencil itself. In 1858, a Philadelphia inventor named Hymen Lipman patented the combination — pencil on one end, eraser on the other, held together by a metal band called a ferrule. The patent was later invalidated because a judge decided it was just two existing ideas glued together, not a new invention. But by then it didn’t matter. The pencil-eraser combo was everywhere.

The thing that’s strange about this story isn’t that bread was used as an eraser — that’s odd, but it makes a certain physical sense. The strange thing is that nobody thought to try rubber before 1770. Rubber trees had been tapped in Central and South America for thousands of years. The Olmec civilization used latex for everything from waterproofing to making bouncing balls. Cortés reportedly brought rubber back to Spain in the 1500s. The material was known. People had been handling it for centuries. But nobody had thought to rub it on a piece of paper until one Englishman grabbed the wrong thing off his desk.

There’s a version of this story where someone, eventually, would have figured it out anyway. Rubber’s properties were too useful, and someone was bound to experiment. But the actual history is messier and more human than that. The eraser exists because Edward Nairne was absentminded. The word “rubber” exists because Joseph Priestley noticed what Nairne was doing and wrote a footnote about it. And the modern pencil-eraser combo exists because a Philadelphia inventor got a judge to look at two simple objects sitting side by side and called the combination a single invention.

Every time you flip a pencil over and rub out a wrong answer, you’re using the product of a 250-year-old chain of accidents — agrab, a footnote, a dropped mixture, a patent that shouldn’t have been granted but was. The eraser doesn’t just undo mistakes. It was one.