North Carolina was inhabited for thousands of years by succeeding cultures of prehistoric indigenous cultures. Before 200 AD, they were building earthwork mounds, which were used for ceremonial and religious purposes. Succeeding peoples, including those of the ancient Mississippian culture established by 1000 AD in the Piedmont, continued to build or add on to such mounds. In the 500–700 years preceding European contact, the Mississippian culture built large, complex cities and maintained far-flung regional trading networks. Its largest city was Cahokia, located in present-day Illinois near the Mississippi River.