The debate over whether boxers or briefs are better for men’s fertility may finally be settled.

Boxers have long been thought to be better for men's fertility. Now, a new a study from Harvard's T.H. Chan School of Public Health makes it close to official.

Briefs can raise the temperature of the scrotum, which can lower sperm counts, according to Dr. Jorge Chavarro, associate professor of nutrition and epidemiology at Harvard and a lead author of the study, published Wednesday in Human Reproduction.

“This confirms previous smaller-scale studies with a larger study,” he told NBC News. “We set out to take a deep, broad look and the effect of self-reported underwear choice on sperm.”

For men who are thinking of trying for a baby or are having trouble conceiving, these are important results to keep in mind.

The study looked at 656 men over a 17-year period, and the finding were conclusive. “What we saw is that type of underwear is related to semen quality,” Chavarro said. “Guys who wear boxers had higher sperm concentration than men who wore more tightly fitting underwear.”

He also explained that men who wore briefs had higher levels of follicle-stimulating hormone, which he posits to be the body’s attempt to push harder to produce sperm.

The study, conducted from 2000 to 2017, looked at men who came to Massachusetts General Hospital as part of a couple with fertility problems. The men provided information on their underwear choice and a sperm sample and blood work for analysis.

The researchers looked at several factors that affect sperm quality beyond total count, such as motility (their ability to swim), morphology (proportion of normal-looking sperm) and DNA damage to sperm. Underwear choice had no effect on these other markers.

While the study is extensive, it has a few possible caveats. The men in the study were part of a couple seeking help with fertility, so it is possible that some of the women had the fertility problem. Still, the men in the study probably had a higher rate of sperm abnormality than men in the general population. Chavarro said, however, that the analyses show that the rate wasn’t much higher.

The type of underwear the men wore was self-reported and not verified by researchers. The study followed the men through their time in fertility treatment and monitored changes in their sperm, but it did not ask about their underwear choice again after the initial questionnaire.

Men’s sperm count and overall fertility has been in a precarious state for some time.

A study published last year showed that sperm rates in men have plummeted 52 percent from 1973 to 2011. The reasons for the drop remain a mystery.

Dr. Ashok Agarwal, director of the Andrology Center at Cleveland Clinic, which studies diseases specific to men, said that there are many factors that lead to lower sperm counts and that the Harvard study doesn’t account for steep, long-term drops in sperm count. But the study's findings, which showed a 25 percent higher sperm concentration in men who wore boxers, are still significant.

"We've known anecdotally that tight underwear raises scrotal temperatures and is bad for sperm count," Agarwal told NBC News. "Now when we counsel patients with fertility problems to wear looser underwear, we have a more solid scientific basis for it."

Chavarro said the findings don't mean that all men should rush to change their underwear. But certain men should consider it.

“For men who are thinking of trying for a baby or are having trouble conceiving, these are important results to keep in mind,” he said.