Long before humans domesticated chickens, they tamed the much larger and more dangerous cassowary bird, new research released Monday has found.

Territorial, aggressive, and frequently compared to a dinosaur in appearance, the bird is an unexpected choice for domestication.

A recent analysis of over 1,000 fossilized eggshell fragments excavated from two rock shelters used by hunter-gatherers in New Guinea suggests that early humans may have collected the eggs of the giant flightless bird before they hatched and then reared the chicks to adulthood.

"This behavior that we are seeing is coming thousands of years before the domestication of the chicken," Kristina Douglass, assistant professor of anthropology and African studies at Penn State, said in a statement.

"And this is not some small fowl, it is a huge, ornery, flightless bird that can eviscerate you. Most likely the dwarf variety that weighs 20 kilos (44 pounds)."

According to the researchers, while a cassowary can be hostile, it "imprints" quickly - it becomes bonded to the first object it sees after hatching. This means it's easy to care for and grow to adulthood.

To arrive at their conclusions, the researchers examined the eggshells of living birds such as turkeys, emus, and ostriches.

As the developing chicks consume calcium from the eggshell, the insides of the eggshells change. The researchers were able to develop a model of what the eggs looked like during different phases of incubation by using high-resolution 3D images and studying the contents of the eggs.

The scientists tested their model on modern emu and ostrich eggs before applying it to New Guinea's fossilized eggshell fragments. The majority of the eggshells discovered at the sites were near maturity, the study said.

These late-stage eggshells imply that individuals residing at these two rock shelter locations were harvesting eggs when the cassowary embryos had fully formed limbs, beaks, claws, and feathers.

The cassowary is now New Guinea's largest vertebrate, and its feathers and bones are highly valued resources for body ornamentation and ceremonial attire. The meat of the bird is considered a delicacy in New Guinea.

As part of the study, the fossilized eggshells were carbon-dated, and their ages ranged from 18,000 to 6,000 years.

Humans are thought to have tamed chickens for the first time around 9,500 years ago.