Living in the city isn't always easy. You have to contend with multitudes of other people and the problems they bring: disease, violence, pollution, pests.

None of these hardships are new to the human experience. In fact, a new study examining one of the world's earliest urban centres some 9,000 years ago shows people have struggled with the challenges of city life since time immemorial.

Led by anthropologist Clark Spencer Larsen from Ohio State University, researchers investigated the ancient ruins of the Neolithic settlement Çatalhöyük in what we now know as Turkey.

Çatalhöyük was founded in about 7100 BCE and existed as a heavily populated community for over 1,000 years, providing a relatively unique archaeological snapshot of a moment in human history when nomadic hunter-gatherers shed their foraging roots to embrace a new collegiate destiny: being town folk.

"Çatalhöyük was one of the first proto-urban communities in the world and the residents experienced what happens when you put many people together in a small area for an extended time," Larsen says.

016 Catalhoyuk 3Excavations in 2015. (Çatalhöyük Research Project)

What happened wasn't always pretty. While abandoning the wilderness for the relative safety of being a farmer might sound like a good trade, it brought new dangers the hunters and gatherers hadn't experienced before, as people came together in an unprecedented form of communal living.

Çatalhöyük represents one of the world's most important Neolithic sites because of its enormous size (13 hectares) and the extent of its archaeological remains preserved in over 20 vertical metres (65 ft) of stratified deposits.

Those remnants include human remains, which number 470 complete skeletons, and hundreds of other fragmentary individuals. It's these bones that tell much of the story of Çatalhöyük's urban strife, amidst its other successes.

After the settlement's founding period – starting off with a small town of a few mud-brick houses – Çatalhöyük slowly evolved to its eventual peak, during which its population amounted to 3,500 - 8,000 individuals.

Before that peak, as the early town swelled, the farming lifestyle – with inhabitants dwelling in close proximity to the animals they now tended – introduced new kinds of infectious risks: sicknesses that dispersed nomadic groups would seldom have encountered.

"They are living in very crowded conditions, with trash pits and animal pens right next to some of their homes," Larsen says.

"So there is a whole host of sanitation issues that could contribute to the spread of infectious diseases."

016 Catalhoyuk 3A child buried with an adult. (Jason Quinlan/Çatalhöyük Research Project)

An analysis of Çatalhöyük's bone remains reveals evidence of bacterial pathogens – detected via bone lesions – which were at their highest in the town's early period. While the problem lessened over the following hundreds of years, it never disappeared, due to a range of factors.

"The appearance of densely settled megasite communities characterised by permanent, year-round habitation, population crowding, minimal sanitation, and narrow, carbohydrate-based diets provides ideal conditions for the evolution, adaptation, and transmission of pathogens," the researchers write in their paper.

Another study published last month backs some of this up, finding evidence of some of the world's earliest known intestinal parasites in preserved human faeces recovered from Çatalhöyük – a scourge easily spread at communal waste pits.

In addition to disease, dental cavities were also seen in the residents' ancient teeth, suggesting a nutritionally poor diet overly reliant on grains and other plant-based foods.

And that wasn't all. Population crowding and associated social stresses may have acted as a trigger for inner-city violence, the researchers think, with cranial analyses indicating fractures thought to have been caused by blows to the head, often from behind.

"Chronologically, frequencies of cranial injuries are in line with the hypothesis of an increase in interpersonal violence during the Middle Period due to the changes in population size and density," the researchers explain, acknowledging that the reasons for the violence remain speculative.

Numerous victims of such attacks (more than half discovered being female) were struck more than once, with some skulls showing evidence of repeated fractures – most thought to be caused by hardened clay balls that were used as weapons, perhaps being propelled from slings.

The violence did not last, though. As the centuries passed and the culture of Çatalhöyük evolved, the ancient city's population began to slowly decline.

Analysis of the shape of residents' leg bones shows that as the settlement progressed over time, people walked more in the town, dispersing further as the land changed through use, with farming and animal grazing extending outwards from the city centre.

"These behavioural adaptations are likely responses to reduced availability of resources locally and the expansion of the range of activity involving food acquisition regionally," the team writes, "circumstances perhaps exacerbated by environmental change involving an increasingly drying landscape coupled with overexploitation of plants and animals."

While it's difficult to be certain about all the factors involved, the researchers say this trekking outward in search of new resources and horizons signified the beginning of the end for this earliest of cities.

"We believe that environmental degradation and climate change forced community members to move further away from the settlement to farm and to find supplies like firewood," Larsen says.

"That contributed to the ultimate demise of Çatalhöyük."

By 5950 BCE, the once thriving town was abandoned, with the townspeople leaving only their dwellings and buried skeletons behind.

Çatalhöyük was done, but more cities would come. In truth, they were only just getting started.

The findings are reported in PNAS.