One very persistent story about the mid-20th century space race involves the development of the space pen.

When humans left the surface of Earth for the weightless environment of space for the first time in the 1960s, they quickly found that ballpoint pens designed for the gravity environment of Earth were not quite so effective in space. Ever tried to write using a cheap ballpoint pen on a vertical surface? Doesn't go so well, does it?

NASA, so the legend goes, spent millions of dollars developing a ballpoint pen that would work in a microgravity environment. Russian cosmonauts, on the other hand, allegedly circumvented the problem by using graphite pencils.

It makes for an amusing anecdote, and has been circulating for decades, going around people's email inboxes before the rise of social media. There's just one big problem. The story is, mostly, untrue.

Initially, astronauts and cosmonauts both used pencils in space. NASA did spend some money researching the viability of a ballpoint pen designed for use in space, but scrapped the project early when it became clear that costs would spiral.

Notepad and pencil issued to astronaut John Glenn for NASA's first crewed orbital spaceflight aboard Friendship 7 in 1962. (Smithsonian Institution)

The Fisher Space Pen was developed independently by a private business, Fisher Pens, on its own dime. And, once the Fisher Space Pen was released to the world in the late 1960s, both astronauts and cosmonauts ended up using it for all their microgravity writing requirements.

But why such a big brouhaha in the first place?

As it turns out, there are certain things that you don't want floating around in space. Pencil detritus is one of them. The lead could snap off, which presents a hazard; but neither do you want flammable wood shavings floating loose in a spacecraft, or the microscopic particles of electrically conductive graphite that shed from a pencil as it writes.

Any minute particles that can get lodged in delicate machinery are a hazard in space, and the particles that come off pencils were cause for significant concern. Fire, in particular, is a serious safety issue in spacecraft, and one NASA doesn't treat lightly after a fire killed all three members of the Apollo 1 mission in 1967.

The ballpoint pens of the time were also hazardous. The first commercially successful ballpoint pen was introduced in 1945, and the pens, according to Fisher Pen Company founder Paul C. Fisher, "leaked everywhere". Droplets of ink are also not something you really want floating around a space capsule.

Apollo astronauts did use felt-tip pens made by the Duro Pen Company; in fact, one such famously saved the Apollo 11 mission after a critical switch broke off. Buzz Aldrin jammed the barrel of his pen in the hole it left, allowing the module to depart from the Moon. (Fisher Space Pens claims it was a Fisher Space Pen, but Aldrin specifies that it was a felt-tip.)

Apollo 7 lunar module pilot R. Walter Cunningham using a Fisher pen in space in 1968. (NASA)

But they also used ballpoint pens after Paul C. Fisher, along with Friedrich Schächter and Erwin Rath, perfected the space pen, filing the first patent in 1965.

As Fisher tells it, the formula for fixing the leaky ink came to him in a dream: "My father had died about two years before, and in that dream, he came to me and said, 'Paul, if you add a minute amount of rosin to the ink, that will stop the oozing'. I told the chemist about that, and the chemist laughed! He said that won't work. He tried every type and quantity of rosin.

"Three months later he came back to me and he said I was right! He said he was trying to find a way to make rosin work, but then he realized that I meant resin! He used two percent resin, and it worked fine. Even with 140 pounds of air pressure behind it, it didn't leak."

Expedition 22 Commander Jeff Williams giving a demonstration aboard the International Space Station in 2010. Behind him, writing implements of various kinds can be seen velcroed to a board. (NASA-ISS Program Office)

These pens use pressurized ink cartridges, and can work across a range of conditions in which a normal ballpoint pen would struggle: widely varying temperatures, upside down, on greasy surfaces.

Fisher offered to sell NASA these pens, and after rigorous testing, NASA decided to purchase them for future Apollo missions. The Fisher Space Pen debuted on Apollo 7 in 1968.

Fisher Space Pens are still in use today, but nowadays astronauts and cosmonauts aboard the International Space Station have many more options. They're supplied with Sharpie pens with a range of colors, as well as – yep – pencils. Of the mechanical, rather than the wood variety.

As NASA astronaut Clayton Anderson explains, "The mechanical pencils are typically used by the crew to write in numerical values necessary to execute on board procedures (burn times, engine configurations, etc.). The ability to erase something in your procedures is an excellent capability to have, especially if situations change, which they often do."

The leads can still break; but advances in technology mean that the filtration system aboard the International Space Station whisks away potentially hazardous debris pretty efficiently.

We are, truly, living in a wondrous future.