A total of 12.2 million people signed up for Obamacare for 2017, about half a million less than a year ago, the Trump administration announced Wednesday.

The drop in enrollment comes as the administration and Republican leaders began working to repeal the sweeping health reform law, saying it was on the verge of collapse. The Department of Health and Human Services pulled ads promoting sign-ups in the crucial final days of open enrollment in January.

But even before the election, Obamacare was plagued by a steep 22% increase in premiums for this year and a sizable reduction in the number of insurers offering plans in the marketplaces. President Trump and Republicans repeatedly pointed to these problems throughout the enrollment period.

Related: CBO report: 24 million fewer insured by 2026 under GOP health care bill

Before they departed, Obama administration officials tried to counteract the Republican messaging and heavily promoted the benefits of the exchanges, including the availability of federal subsidies to lower premiums. Several states that run their own exchanges also sought to increase enrollment.

Enrollment, which isn't final until consumers pay their first month's premium, typically drops during the year as participants stop making payments or find coverage elsewhere. The Obama administration had expected 13.8 million people to sign up by the end of open enrollment on January 31 and an average of 11.4 million people to be enrolled during 2017.

Some 10.4 million people were enrolled in Obamacare plans in 2016, as of June, the most recent figures available.

Related: Obamacare enrollment projected to grow 9% in 2017

The final tally for the open enrollment period showed that 9.2 million people signed up for coverage through the federal marketplace, which handles enrollment for 39 states. Another 3 million picked plans on state-based exchanges.

Nearly 10.1 million consumers qualified for federal subsidies that reduced their premiums to less than 10% of their income. On average, subsidized enrollees are paying $106 a month, the same as last year.

But the premium spike means that the federal government has to shell out more in assistance. It's spending an average of $383 a month in subsidies per participant, up from $290 last year.

On average, ACA marketplace consumers receiving tax credits are literally paying exactly the same this year as last year -- $106 per month. pic.twitter.com/WzqA6DsWRN — Larry Levitt (@larry_levitt) March 15, 2017

On the flip side, the federal government's average cost for ACA premium tax credits increased from $290 per month to $383. pic.twitter.com/wInjis6f4D — Larry Levitt (@larry_levitt) March 15, 2017

Some 31% of people were new to the marketplace, while 23% were automatically re-enrolled. Another 43% were existing customers who actively shopped for a new plan. (The remaining 3% were re-enrolled, but officials don't know whether it was automatic or if they picked a new plan.)

About 27% of consumers were between the ages of 18 and 34, a demographic crucial to the health of Obamacare since these folks typically spend less on health care and can offset the costs of older and sicker people. That's down slightly from 28% last year.