A bad diet may lead to polycystic ovary syndrome (PCOS), research suggests.
PCOS patients produce too much testosterone, which interferes with their periods and makes it difficult to get pregnant.
High levels of insulin causes the ovaries to produce high quantities of the male sex hormone.
In the latest study, scientists analysed the gut of 58 teenagers and found obese girls with PCOS had more harmful bacteria than healthy participants.
Recent research has shown an unbalanced gut microbiome can affect the body's response to insulin, causing a resistance.
Insulin resistance means the body's tissues are resistant to the effects of insulin, which breaks down sugar. The body therefore has to produce extra insulin to compensate.
The more insulin coursing through the body, the more testosterone is released, increasing the chance of PCOS, according to scientists from Children's Hospital Colorado, behind the study.
Insulin resistance can also lead to weight gain, which can make PCOS symptoms worse because having excess fat causes the body to produce even more of it.
Polycystic ovary syndrome (PCOS) is a common condition that affects how a woman's ovaries work.
It causes the ovaries to become bigger than they should be and to develop numerous small cysts on the outer edges.
PCOS affects around 10 per cent of women of childbearing age and can cause symptoms including irregular periods, weight gain, hair loss and oily skin or acne.
Women with the condition often struggle to fall pregnant and are also known to have a higher risk of heart problems.
The new research raises hopes that improving gut health may help treat PCOS.
Scientists found that the 'unhealthy' bacteria in girls' stools was related to higher testosterone levels, liver inflammation and harmful blood fats known as plasma triglycerides.
All of these were indicators of metabolic syndrome, the term given to diabetes, high blood pressure and obesity.
Co-author Dr Melanie Green said: 'We found that in adolescents with PCOS and obesity, the bacterial profile (microbiome) from stool has more 'unhealthy' bacteria compared to teens without PCOS.
'The unhealthy bacteria related to higher testosterone concentrations and markers of metabolic complications.
'The gut microbiome may play a role in PCOS and its related metabolic complications, and these changes can be found in teenagers who are early in the course of the condition,' she added.
The findings come after 2017 research which showed that having a low GI, healthy diet and drinking alcohol in moderation may help ease the symptoms of PCOS.
Scientists at the Royal College of Obstetricians and Gynaecologists advised women to eat foods such as meat, fish and eggs and vegetables, whilst avoiding the likes of white pasta, bread and rice.
PCOS sufferers are also generally advised to have a healthy diet which includes at least five portions of fruit and vegetables a day and lean meat and fish.
They should also aim to eat three meals a day, with low-calorie snacks if needed.
Limiting alcohol may also ease a PCOS sufferer's condition.
Experts have long promoted foods containing probiotics - bacteria which are thought to be good for gut health.
These include yoghurt, aged cheese, onions and bananas.