HealthCare.gov front page (Image: Centers for Medicare and Medicaid Services)

After suffering from years of losses, the U.S. health insurance industry figured out how make money in the individual major medical insurance in 2017, a new analysis shows.

The secret? Raising their prices.

The average cost of health insurance plans sold in the individual market climbed about 22% in 2017, as insurers boosted premiums well above what they spent on medical care. That left many in a profitable position for the first time since 2014, when major Affordable Care Act provisions went into effect, according to a Kaiser Family Foundation report released Thursday.

(Related: HealthCare.gov Signup Total Falls 4.5%)

Foundation analysts found  that average gross margins per member per month increased to $78.52 in 2017, up from $14.36 in 2016, and up from $37.44 in 2013.

A copy of the full report is available here.

Foundation analysts included ACA-compliant major medical medical plans sold outside the ACA public exchange system as well as exchange plans.

Companies that have stuck with the program are facing fresh challenges. A law passed by Congress repealed the requirement that all people have health insurance, and the Trump administration has pushed to let companies offer health plans that don’t comply with the ACA’s rules.

To make up for those risks, some insurers are requesting big rate increases again for 2019.

“These new data from 2017 offer further evidence that insurers in the individual market are regaining profitability, even as political and policy uncertainty, repeal of the individual mandate penalty as part of tax reform legislation, and proposed regulations to expand loosely-regulated short-term insurance plans cloud expectations for the future,” according to the analysis.

Another big change not shown in the data: Insurers such as UnitedHealth Group Inc., Humana Inc. and Aetna Inc. that didn’t profitably sell individual major medical plans largely dropped out of the market by last year. That left behind the profitable insurers, but it also meant fewer health plan choices for people in many parts of the country.

Rising premiums have helped insurers’ bottom lines.

They’ve also become a major pain point for consumers, and a rallying cry for opposition to the health law. While about 9.8 million people in the individual market get subsidies that insulate them from the rising cost of coverage, about 8 million others, mainly those with higher incomes, don’t get help. Some of those people have opted against buying insurance at all.

— Read Colorado’s 2018 Individual Health Rates Will Be Weird: Wakely on ThinkAdvisor.

— Connect with ThinkAdvisor Life/Health on Facebook and Twitter.

Copyright 2018 Bloomberg. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.