In 2016, the IRS sent letters to millions of Americans who had paid tax fines for not having health insurance. This bureaucratic process accidentally set the stage for a rigorous scientific experiment.

You see, the IRS meant to send letters to all 4.5 million Americans who did not meet the Obamacare "individual mandate" to obtain health insurance, according to The New York Times . But the agency didn't have enough funding to send the letters to everyone, and some 600,000 people were left off the mailing list at random.

Thus, the agency inadvertently created a randomized controlled trial, a type of study that's considered the "gold standard" for medical research. In such a study, participants are randomly assigned to a particular intervention — in this case, letters about obtaining health insurance — or a "control" group that doesn't receive the intervention.

In the letters, the IRS explained the fine and pointed people toward resources that could help them sign up for health insurance .

A new analysis of this accidental experiment found that people who received the letters were more likely to enroll in health insurance the next year, compared with those who did not receive the letters. What's more, gaining health coverage was tied to a 12% decrease in the risk of dying over the two-year study period, the Times reported.

The biggest benefit was seen among adults ages 45 to 64. For every 1,648 letters sent to people in this age group, there was one fewer death over the two-year period, compared with those who didn't receive a letter. That adds up to about 700 lives saved overall, the Times reported.

“We were hoping the letters would be beneficial and wanted them to go to everybody," study co-author Jacob Goldin, a former economist at the U.S. Treasury Department, told the Times. "But it was also an exciting research opportunity," said Goldin, who is now an associate professor at Stanford University.

The study is one of the first to show that enrolling in health insurance reduces the risk of early death , the authors said. This topic has proved difficult to investigate, particularly with a randomized study.

The new research provides "a really high standard of evidence that you can't just dismiss," Sarah Miller, an assistant professor of business economics and public policy at the University of Michigan, who was not involved with the study, told the Times.

The study was published as a "working paper" for the National Bureau of Economic Research and has not been peer reviewed.

Originally published on Live Science .