Strongly correlated quantum systems are among the most intriguing and fundamental systems in physics. One such example is the Tonks-Girardeau gas, proposed about 40 years ago, but until now lacking experimental realization; in such a gas, the repulsive interactions between bosonic particles confined to one dimension dominate the physics of the system. In order to minimize their mutual repulsion, the bosons are prevented from occupying the same position in space. This mimics the Pauli exclusion principle for fermions, causing the bosonic particles to exhibit fermionic properties. However, such bosons do not exhibit completely ideal fermionic (or bosonic) quantum behaviour; for example, this is reflected in their characteristic momentum distribution. Here we report the preparation of a Tonks-Girardeau gas of ultracold rubidium atoms held in a two-dimensional optical lattice formed by two orthogonal standing waves. The addition of a third, shallower lattice potential along the long axis of the quantum gases allows us to enter the Tonks-Girardeau regime by increasing the atoms' effective mass and thereby enhancing the role of interactions. We make a theoretical prediction of the momentum distribution based on an approach in which trapped bosons acquire fermionic properties, finding that it agrees closely with the measured distribution.