A Labrador retriever saves a drowning boy.

A bloodhound finds a missing Alzheimer's patient.

A German shepherd guides a blind person through city streets.

A Boykin spaniel tracks threatened box turtles for researchers.

How did a single species develop such wide-ranging talents and become our partners in life? The answer lies not only in the plasticity of dogs — their amazing range of size, shape and skills — but also in human ingenuity.

Dogs are designer animals, cut from the fabric of our needs and fashioned to suit almost any purpose short of neurosurgery or space flight — no, wait, they've done space flight.

The fossil record tells us that human association with dogs began approximately 16,000 to 20,000 years ago, but molecular dating — a measure of evolutionary change over time based on the rate of change in specific DNA sequences — suggests that domestication may have begun as long ago as 32,000 years.

Those proto-dogs probably first performed offsite security and waste management jobs, living on the outskirts of human settlements. As humans became used to the presence of dogs, they began selecting dogs with a prime watchdog characteristic: a loud and insistent bark, the better to alert them to the presence of predators or strangers.

That bark is one of the distinguishing characteristics between wild and domesticated dogs. Among wild dogs, barking is a puppy behavior. Other puppylike behaviors retained by adult dogs (known as neoteny) that humans began to select for include chasing prey but not going in for the kill — a practice that evolved into herding — and looking to humans for direction, a quintessential characteristic of some hunting dogs such as spaniels and retrievers.

That's how dogs began to change from biological burglar alarms to the variety of hunting, herding, working and companion dogs we have today. And it happened because humans were able to observe the potential of dogs and figure out how to harness it, systematically inventing and reinventing dogs to meet different needs based on their technology and circumstances at the time.

Humans needed dogs to find and kill game? They developed hounds. Those dogs were further refined into scenthounds (to track game) and sighthounds (to chase and bring down game). As hunting implements changed from clubs to spears to bow and arrows to firearms, dogs changed, too. Humans invented pointers, setters, spaniels and retrievers, each with a particular function that improved hunting success.

And they didn't stop with hunting. It's likely that the bond with dogs allowed humans to develop animal husbandry. With dogs, they could control more sheep than they could working alone. And as with hunting dogs, herding dogs were gradually modified to work with different types of livestock in different terrain.

From hunting and herding, it was a short step to flock protection by large mastiff-type dogs. Attentive and trustworthy, flock-guardian dogs are large enough to deter most predators, but they have other tricks up their sleeves, using barking and body language to escort unwanted intruders away from their charges.

Dogs also were among the first draft animals, especially in the Americas, before Europeans arrived with horses. Where people had wheels, dogs pulled carts; in cold northern climes or the Great Plains, dogs pulled sleds or travois.

In the 21st century, dogs typically have different jobs: search and rescue, drug and explosive detection, and assistance and therapy work, to name just a few. Best of all, they remain our companions.

It's a position they've held for thousands of years, but now is recognized as vital to our well-being. We're lucky to have them.