The changing demographics in the United States over the last 30 years should have led to more teen pregnancies. Instead, the teen pregnancy rate, which increased steadily through the 1970s and ’80s before peaking in the 1990s, has dropped precipitously.

That’s an endorsement of widely available comprehensive sex education and readily accessible birth control, both of which played a pivotal role in the decline. In order to continue on that path, quality sex education must be available to all students across the country.

This is an area that Maine is getting right. From 2010-14, the state’s birth rate – different from the pregnancy rate, but related, of course – for women ages 15 to 19 was 1.2 percent, the sixth lowest in the country and half the national average. That represents almost a 50 percent decrease from 10 years ago.

That drop is mirrored throughout the United States, where teen pregnancy in 2010 declined 51 percent from the historic peak of 1990, and 15 percent from 2008. Since 1990, teen pregnancy has dropped in every state and every ethnic group, and teen pregnancy and birth rates are at all-time lows.

Many factors likely contributed to the change, but none more than teens’ exposure to evidence-based sex education, which teaches them the risks of having and the benefits of delaying sex, but also how to discuss the subject effectively with their peers, partners and parents, and how to use birth control correctly.

From 1995-2002, the proportion of teens delaying their first sexual experience increased slightly. From 2003-2010, the proportion of teens who had never had sex did not change significantly at all.

So as teen pregnancy was falling, the number of teens having sex stayed relatively the same. It was the use of contraceptives that changed, not an increase in abstinence.

During that time, the use of all birth control, particularly condoms, increased. So did the use of new, highly effective methods, such as hormonal treatment and IUDs, which are far better at preventing pregnancy than oral contraceptives and condoms.

At the same time, areas of the country that favor “abstinence-only” sex education feature the highest rates of teen pregnancy.

In the Southern states of Arkansas, Louisiana and Mississippi, for example, twice as many teens are getting pregnant than in Maine.

And while Maine does well overall, there are pockets of the state where teen pregnancy remains high.

That is partially because sex education is offered through schools, who decide the type and quality of the lessons. The less teens know about sex, and the harder it is for them to access birth control, the more likely they are to get pregnant.

Where a teen is from shouldn’t determine how well they learn the complexities and consequences of sexual relationships. Comprehensive sex education should be available to all students, so they don’t make a mistake that will track them for a lifetime.