Those large numbers came in the face of big challenges. Before the enrollment period, which ran from Nov. 1 to Dec. 15, many insurers announced big rate increases for 2018. The Trump administration cut the budget for advertising to promote enrollment and greatly reduced grants to insurance counselors, known as navigators, who help people sign up for coverage.

In the first nine months of this year, Republicans tried repeatedly to repeal the Affordable Care Act, continually criticized it and asserted that health insurance markets were collapsing. Mr. Trump highlighted huge increases in premiums without noting that many consumers were eligible for federal subsidies that help cover the extra cost.

For weeks, consumers have been confused about whether they would be subject to penalties for going without insurance.

The report Thursday shows sign-ups by people in 39 states that use HealthCare.gov. It does not include activity in 11 states that operate their own insurance exchanges and are also reporting strong enrollment. In some of those states, consumers have more time to sign up. The deadline is Jan. 14 in Minnesota, Jan. 15 in Washington State and Jan. 31 in California and New York.

In addition, people losing coverage because their insurer withdrew from the marketplace may qualify for a special enrollment period providing 60 additional days to sign up for a health plan.

More than 80 percent of people buying insurance through the marketplace qualify for subsidies to help pay premiums. The Trump administration said in October that the average subsidy in states using the federal marketplace would be $555 a month next year, up 45 percent from this year.

Among states using the federal exchange, the largest numbers of sign-ups this year were in Florida (1.7 million), Texas (1.1 million), North Carolina (524,000), Georgia (483,000), Virginia (403,000), Pennsylvania (397,000) and Illinois (340,000).