For centuries man has been fascinated by the beauty of the betta. Their slender bodies and oversized fins that hang like silk studs come in a variety of bright colors that are seldom seen in nature.

Bettas, also known as Siamese fighting fish, did not become works of art in their own right, however. The elaborate colors and long, flowing fins of the Betta are the result of a millennium of careful selective breeding. Or as Yi-Kai Tea, a PhD student at the University of Sydney who studies the development and speciation of fish, put it: “Literally the fish equivalent of domestication of dogs.”

A new study uploaded to preprint service BioRxiv in April shows, through genome sequencing, that humans began domesticated Bettas at least 1,000 years ago. The millennium of careful selection resulted in the astonishing diversity of indigenous bettafish living today, but it also resulted in major genetic changes in both wild and indigenous bettafish. By studying the genes of these fish, the study’s authors argue, scientists can learn a lot about how domestication alters the genes of wild animals.

Mr. Tea, who was not involved in the analysis, praised the research as “the first major study to pull apart the genetic basis for this remarkable phenomenon,” he said.

All 73 Bettas species originate from Southeast Asia. But the ubiquitous type that is sold in pet stores and flea markets is Betta splendens. Domesticated bettas of this species are far more colorful than most wild species.

“Wild bettas can look very different from decorative bettas,” said Young Mi Kwon, Columbia University researcher and lead author of the study. “They have short fins, a dull color, and they lack the conspicuous fin that is found in ornamental varieties.”

Domestic bettas are also “very aggressive,” she said. “You cannot put two Betta males in the same tank, they will attack each other and fight to the death.”

Wild Bettas are far less aggressive. This is likely because the ornamental species “were originally domesticated for fighting, much like cockfighting,” Ms. Kwon said.

At the end of the 19th century, breeders focused on making ornamental varieties of the fish that had become extremely popular in the West. “That story shaped the decorative bets we see today – a really beautiful fish with a temper,” she said.

To determine exactly how that story shaped the decorative bets we see today, Ms. Kwon and a team of scientists collected DNA samples from wild and domestic betta and sequenced their genomes.

“We were surprised at how long Bettas have been part of human history – they have been domesticated for at least 1,000 years, which makes them one of the oldest known domestications of fish,” said Ms. Kwon. This is farther back than previous anecdotal research cited in the study, which suggests Bettas were bred for battle as early as the 13th century.

Research also showed why breeders were able to produce dozens of different varieties of betta. There are red, yellow, and blue bettas, bettas with large and small fins, and even bettas that resemble Thailand’s flag. If you can imagine it, it probably exists.

“Many of the traits that breeders choose are regulated by very few genes that have a big effect,” said Ms. Kwon. “This means it doesn’t take as many crosses to get the properties or traits you want in your fish.”

As expected, the researchers also found that native Bettas are genetically dissimilar to their wild cousins. However, they were surprised to find that indigenous Bettas have mixed with wild ones over the past few years. This hybridization, which was likely the result of the release of native Bettas into the wild, could undermine conservation efforts.

“Wild domestic workers – if they are more fit than their wild counterparts – can take over the wild populations,” said Ms. Kwon. Many wild species of betta are critically endangered, mainly due to habitat loss.

By studying the evolutionary history of these fish more closely, the researchers hope to improve our understanding of how domestication alters the genes of species.

While there is still much to be learned about how domestication affects Bettas, the process has produced a multitude of pretty fish whose fantastic colors and shapes may never have otherwise existed.

Bettas as flamboyant as the native strain “are unlikely to be found in the wild,” Tea said. “It’s like expecting Chihuahua to exist in the wild without human interference.”