In fact, according to the UK government, the RSA folk didn't really invent the RSA algorithm. They say it was invented at Government Communications Headquarters (GCHQ), the british equivalent of the NSA. The man who started this went by the name of James Ellis, who worked in the Communications-Electronics Security Group.

The story starts when he was asked to help reduce the cost of key distribution for secret communications. Instead of finding ways to cut corners, he decided to go all the way, and eliminate the problem entierly. By 1969, he knew that this was possible, and enlisted the help of Clifford Cocks, who helped figured out the solution, but without realizing the significance. He passed it on to another mathmatition named Malcome Williamson, who is trying to find a flaw, actually discovered Diffie-Hellman-Merkle key exchange in 1975, when the DHM trio was just getting started. The GCHQ didn't, however patent the work, due to secrecy restrictions, so DHM and RSA are given credit.

This is not to say that those folk didn't do a wonderful job, they arrived to the same conclusion independently and were truly the first to realize its full potential.

Much of this information is taken for a wonderful book called The Code Book by Simon Singh.