It was so much fun — you sang. You danced. You were the life of the party. Now you’re looking at the pictures and really wish the margaritas and champagne had not been quite so delicious.

Researchers reported Monday they’ve found a gene that might help explain why so many people find alcohol irresistible, and why others are able to abstain from more than a drink or two.

Crowd dancing at a music festival WIN-Initiative / Getty Images/WIN-Initiative RM

The gene is called beta-Klotho, and it seems to act as a brake on drinking alcohol. Mice engineered to lack this gene seem to like alcohol much more and certainly choose to drink more alcohol than normal mice, the researchers found.

And people have the same gene. Looking at the records of more than 100,000 people of European descent, they found people with one version of beta-Klotho reported they drink less on average.

“There was a clear variation in this one gene in the people that liked to drink more versus less,” said Dr. David Mangelsdorf of the University of Texas Southwestern Medical Center, who worked on the study.

About 42 percent of the people in the study had the low-drinking version of the gene, which had just one tiny difference — called a single-nucleotide polymorphism or SNP — from the version seen in most people.

Mangelsdorf hopes to use this finding as the basis for a better treatment not just for alcoholism, but also for other types of people who drink too much.

"There is no drug available that suppresses the desire to drink alcohol. Nothing," Mangelsdorf told NBC News.

"There are drugs that alcoholics take that make them sick."

Related: Booze, Bacon, Obesity Linked With Stomach Cancer

It’s not small problem. “Excessive alcohol consumption is a major public health problem worldwide, causing an estimated 3.3 million deaths in 2012,” Mangelsdorf and colleagues wrote in their report, published in the Proceedings of the National Academy of Sciences.

Heavy alcohol intake can raise the risk of many different types of cancer, including breast and liver cancer, as well as heart disease. It can also damage the liver in other ways and hurt relationships and success at work.

“Excessive alcohol consumption is a major public health problem worldwide, causing an estimated 3.3 million deaths in 2012."

According to the Substance Abuse and Mental Health Services Administration, 140 million Americans drink alcohol. About 23 percent can be classified as binge drinkers — four to five drinks in a row for most people — and 6 percent are heavy drinkers who do this five or more days a month.

The National Institute on Alcohol Abuse and Alcoholism defines low-risk drinking for women as imbibing no more than three drinks on any single day and no more than seven drinks a week. For men, it is defined as no more than four drinks on any single day and no more than 14 drinks a week.

Researchers have already found genes associated with how well people metabolize alcohol. People with sensitivities to alcohol — who either get drunk easily or who get sick from drinking — often avoid it.

But others naturally drink lightly or not at all.

Related: Gene May Discourage Heavy Drinking

The UTSW team worked with other research teams across the U.S., Europe and in China to see if there is a gene for controlled drinking. They did what’s called a genome-wide association study, screening all the genes in people to see if they could associate it with behavior.

They think they found such a link with beta-Klotho. Like so many genes, it doesn’t act by itself but works with genes called FGF21 and FGF19. These two genes control hormones with the same names that are associated with alcohol preferences, as well as for craving sweet foods.

“FGF21 is part of a liver–brain feedback loop that limits the consumption of simple sugars,” the team wrote.

Tests in mice showed that when they did not have beta-Klotho, they strongly preferred water laced with alcohol to plain water, even when dosed with FGF21 hormone. Monkeys given FGF21 hormone crave sweet drinks less, Mangelsdorf said. "We think it's through the same mechanism as the desire to drink alcohol," Mangelsdorf said.

So it looks like the two genes act together to control alcohol consumption. “Our results suggest that this pathway could be targeted pharmacologically for reducing the desire for alcohol,” the team wrote.

Related: Gene Linked With Alcoholism, Depression

Mangelsdorf’s team has already found that FGF21 affects weight loss and perhaps the immune system too. Teams are working to develop the hormone as a treatment for obesity and other conditions.

“This is a hormone with some remarkable pharmacologic effects,” Mangelsdorf said in a statement. “The current study suggests that the FGF21-beta-Klotho pathway regulates alcohol consumption in humans and seems to point to a mechanism that we might be able to influence in order to reduce alcohol intake.”

“If we are able to identify people with heavy, unhealthy or alcohol use disorders who have this genetic variant, we can specially target this complex,” said Dr. Sidarth Wakhlu, a psychiatrist who heads UTSW’s addiction division.