Parents and doctors should only give young children antibiotics when they absolutely need it.

According to a new study, early antibiotic use can be a contributing factor to the childhood obesity epidemic. Researchers examined the link between antibiotic use before the age of 2 and obesity risk at the age of 4 in a sample of 21,714 children taken from The Health Improvement Network. The Network collected data on more than 10 million people living in the United Kingdom from 1995 to 2013.

The researchers found that children who were exposed to antibiotics before turning 2 years old had a 1.2 absolute increased risk of being an obese child. The relative risk of obesity for this group of kids was 25 percent higher than the risk calculated for children who were not exposed to antibiotics before the age of 2. The researchers added that risk of obesity increased with the number of antibiotic prescriptions. Antifungal agents did not appear to increase risk of obesity.

"Antibiotics have been used to promote weight gain in livestock for several decades, and our research confirms that antibiotics have the same effect in humans," said Frank Irving Scott, an assistant professor of medicine at University of Colorado Anschutz Medical Campus, Aurora.

Although the researchers could not uncover how antibiotic use was tied to obesity, they reasoned that the drugs could be changing the children's gut microbiome. Several studies have suggested that the gut microbiome plays a key role in the development of obesity.

"Our work supports the theory that antibiotics may progressively alter the composition and function of the gut microbiome, thereby predisposing children to obesity as is seen in livestock and animal models," Scott said.

The researchers are recommending that doctors always consider other options before prescribing antibiotics to young children. The researchers noted that while antibiotics are extremely important in treating certain conditions, about 10 million antibiotic prescriptions written for children do not have a "clear indication."

"Our results do not imply that antibiotics should not be used when necessary, but rather encourage both physicians and parents to think twice about antibiotic usage in infants in the absence of well-established indications," Scott said.

The study was published in the American Gastroenterological Association journal, Gastroenterology.