Many of the basic principles of companion planting were used thousands of years ago in Mesoamerica. From about 8,000 years ago, Native American peoples grew squash, maize and common beans together. The stalk of the corn were there for the beans to climb, and the beans fixed nitrogen, helping the maize.