For couples struggling to conceive, a simple medical procedure using a century-old ingredient could be the answer.

For decades, doctors have noticed that women with unexplained infertility can sometimes achieve pregnancy after undergoing a standard medical test for the uterus. Now the largest-ever clinical trial of its kind has confirmed that it's all down to lipiodol - a contrast solution used in the test. The findings could give hope to many couples whose last option would otherwise be expensive IVF.

Hysterosalpingography (HSG) is a common X-ray investigation of a woman's uterus and fallopian tubes. To make these organs clearly visible on the image, radiologists fill them with a contrast agent, essentially 'flushing' them.

HSGs have been performed since the early 20th century, and historically that contrast agent was lipiodol - a specially prepared poppyseed oil solution. These days, a water-based agent that provides better contrast has become more popular.

An HSG can be done for many reasons, but one of the most common is to investigate potential reasons for infertility, which is defined as an inability to get pregnant after one year of unprotected sex.

Doctors started noticing that for some infertile women the very procedure of an HSG was enough to achieve fertility again, so they started looking into it. Few studies have been done to determine whether it's just the flushing itself that helps, or if it's the type of agent used.

A 2005 systematic review of clinical studies concluded that there was limited evidence suggesting lipiodol was providing a benefit, but not enough to give a clear answer.

"Until now, it has been unclear whether the type of solution used in the procedure was influencing the change in fertility," says obstetric clinician Ben Mol, lead author of the latest clinical trial.

In this study, an international team compared the benefits of an HSG conducted with either lipiodol or a water-based solution in 1119 infertile women across 27 medical centres in the Netherlands.

They found that 39.7 percent of the women who received an HSG with lipiodol got successfully pregnant, as opposed to nearly 29.1 percent of the women who got the water-based contrast agent.

"The rates of successful pregnancy were significantly higher in the oil-based group, and after only one treatment," says Mol.

"This is an important outcome for women who would have had no other course of action other than to seek IVF treatment. It offers new hope to infertile couples."

The participants were randomly assigned to one of the two contrast agents, although the study was not entirely blinded, as a radiologist could easily tell which contrast agent has been used - the X-rays look different.

But the study authors note that this is not a huge problem, given that the outcome they were measuring for is objective - a woman either gets pregnant or doesn't.

"I think the results are definitely interesting, and I think they're quite exciting," Hannah Brown told ScienceAlert, a research fellow at the University of Adelaide who wasn't involved in the study. She has worked alongside Mol on other research projects.

"Any advance in knowledge that means we can treat people without really unnecessary, invasive, extensive technologies is really exciting."

According to Mol, the results are encouraging, because an HSG is way cheaper than even one cycle of IVF.

"Considering that 40 percent of women in the oil-based group achieved a successful pregnancy, that's 40 percent of couples who could avoid having to go through the huge costs and emotions associated with IVF treatment," he says.

Mol believes that couples should speak to their doctor about potentially using lipiodol, and that fertility clinics could help by offering the procedure before people embark on IVF.

But despite the encouraging results, we still don't know why the oil solution is so effective - it could be something to do with how the contrast agent literally flushes the tubes. It could also have an effect on the environment inside the uterus, but there's no solid data on either.

"Some studies suggest that [HSG] testing with an oily medium will flush debris and dislodge mucus plugs from undamaged tubes," write the researchers.

According to Brown, it would be possible to do some "fairly cheap and easy" research, possibly in animals, to determine why lipiodol is so much better.

"If we understand what it is about the oil that helps to, perhaps, prime the uterus for implantation, then maybe we can understand how we can make that happen even naturally," she tells ScienceAlert.

A lipiodol HSG may not be the magic bullet for every couple, but it's probably worth a shot if you can get it.

The study has been published in The New England Journal of Medicine.