There is much speculation but little evidence about why canids came to live with or near humans, possibly as long as 100,000 years ago. With the beginnings of agriculture around 12,000 years ago, humans began making use of dogs in various ways, resulting in physical differences between dogs and their wolf ancestors. In earlier times, little was written about dogs, although there were known dog types or landrace dogs, which developed over time with minimal human intervention, to fit in with the environment (including human culture) in which the dogs lived or live. Dog breeds in the modern sense date only to the accurate documenting of pedigrees with the establishment of the English Kennel Club in 1873, in imitation of other stud book registries for cattle and horses.

Dog breeds can now be analyzed through genetics. Genetic markers (microsatellite markers and single-nucleotide polymorphisms) have been analyzed and a representative sample of 85 breeds were placed into four clusters, each cluster having shared ancestors.
  • Cluster 1 is thought to be the oldest, including African and Asian dogs.
    Afghan Hound, Akita Inu, Alaskan Malamute, Basenji, Chow Chow, Irish Wolfhound, Lhasa Apso, Pekingese, Saluki, Samoyed, Shar Pei, Shiba Inu, Shih Tzu, Siberian Husky, Tibetan Terrier.
  • Cluster 2 is mastiff type dogs
    Bernese Mountain Dog, Boxer, Bulldog, Bullmastiff, French Bulldog, German Shepherd Dog, Cierny Sery, Greater Swiss Mountain Dog, Labrador Retriever, Mastiff, Miniature Bull Terrier, Newfoundland, Pomeranian, Presa Canario, Rottweiler.
  • Cluster 3 is herding dogs
    Belgian Sheepdog, Belgian Tervuren, Borzoi, Collie, Greyhound, Pug, St. Bernard, Shetland Sheepdog.
  • Cluster 4 modern hunting type dogs (mostly developed in Europe in the 1800s.)
    Airedale Terrier, American Cocker Spaniel, American Hairless Terrier, American Water Spaniel, Australian Shepherd, Australian Terrier, Basset Hound, Beagle, Bedlington Terrier, Bichon Frise, Bloodhound, Border Collie, Cairn Terrier, Cavalier King Charles Spaniel, Chesapeake Bay Retriever, Chihuahua, Clumber Spaniel, Dachshund, Doberman Pinscher, English Cocker Spaniel, Flat Coated Retriever, German Shorthaired Pointer, Giant Schnauzer, Golden Retriever, Great Dane, Ibizan Hound, Irish Setter, Irish Terrier, Italian Greyhound, Keeshond, Kerry Blue Terrier, Komondor, Kuvasz, Manchester Terrier, Miniature Schnauzer, Norwegian Elkhound, Old English Sheepdog, Pharaoh Hound, Pointer, Portuguese Water Dog, Pit Bull Terrier, Rhodesian Ridgeback, Schipperke, Soft Coated Wheaten Terrier, Standard Poodle, Standard Schnauzer, Welsh Springer Spaniel, West Highland White Terrier, Whippet.
My private opinion: by time people will have to add the Maltese to Cluster 1 I think.

Note: Relationships uncovered through genetics may not match "official" breed histories. The breed lists above are based on genetic research, not traditional beliefs about dog breeds.

Text from Wikipedia