WASHINGTON — The first phase of the Affordable Care Act ended much the same way it began: The federal website drew millions of visitors and crashed at least twice.

As the Patient Protection and Affordable Care Act moves into a new stage Tuesday, when most consumers must be insured or pay a fine, an estimated 45 million Americans remain uncovered, a continuing burden for medical providers and governments, and a target for Republicans seeking to upend President Barack Obama’s signature initiative in the midterm election.

Still, the health law also known as Obamacare has survived with more than 7 million consumers signed up for private health plans and as many as 3.4 million people being added to the Medicaid program for the poor, according to the latest data. They’ll start using medical services guaranteed by the law’s strict mandates, even as some consumers complain about the high cost of their new premiums and insurers worry about a surge in older, sicker patients.

President Barack Obama announced Tuesday that the national health care program signed up more than 7 million people by the end of March, notching a rare victory after a months-long, glitch-filled rollout of the law.

“This law is doing what it’s supposed to do. It’s working,” Obama said. “The debate over repealing this law is over. The Affordable Care Act is here to stay.”

“The problem isn’t over with the program,” said Julian Zelizer, a history professor at Princeton University in New Jersey. “This is a really complex program that is more than just about registering. It’s about registering the right kinds of people. It’s about the various states ultimately coordinating this effectively with the federal policy. So there’s a million ways this could still go wrong.”

Attention should now turn to the quality of coverage enrollees receive, their access to medical services and insurer preparations for 2015. Already, Indianapolis-based WellPoint Inc., the largest exchange insurer, has warned it may propose “double-digit plus” premium increases for the next enrollment period, which begins in November. Insurers must quickly assess the medical demands of their new customers before filing rates at the end of May.

During Monday’s deadline day for 2014 enrollment, healthcare.gov, the federal exchange website, recorded more than 4.8 million visits, the most in a single day, and there were 2 million calls to the telephone center, Joanne Peters, a spokeswoman for the Department of Health and Human Services, wrote on Twitter Tuesday morning. At local events across the country, people lined up for hours trying to enroll.

A computer error stalled the federal site for several hours around midday Monday, preventing customers from creating new accounts. That occurred after the government pulled the website from service in the early morning hours when a software bug was discovered during scheduled maintenance.

“We were a little glitchy on Friday and over the weekend, but today it’s just been terrible,” said John Foley, a supervising attorney at the Legal Aid Society of Palm Beach County in Florida, which is helping enroll people.

Tuesday, the website will be geared toward helping those who began signing up but didn’t finalize their enrollments, Peters said on Twitter.

Determining the success of the system may take a while, according to the Congressional Budget Office. The CBO, which estimates that 45 million Americans will be uninsured this year despite the law, says that number will only shrink as far as 31 million by 2024, the 11th year of expanded coverage.

The percentage of uninsured nonetheless has fallen since the law was passed in 2010, according to a Gallup Poll survey. In the first quarter of 2014, the rate fell to 15.9 percent, its lowest quarterly level since 2008.

Supporters say the numbers represent a clear gain from the law. The data “is perhaps the best sign that the Affordable Care Act is making progress toward achieving its key objective,” Ron Pollack, executive director of Families USA, a consumer advocacy group that supports the law, said Monday in a statement.

Opponents, meanwhile, question whether most of the new enrollees already had insurance, and had to sign up for the health law after their previous coverage was canceled because of the law’s stricter coverage mandates.

HHS, which runs the exchanges, said it isn’t sure. “We’re a looking at a range of data sources to determine how many marketplace enrollees previously had coverage,” Peters, the agency’s spokeswoman, in an email. “Previous insurance coverage is an important metric and we hope to have additional information in the future.”

For Obama, the recent enrollment surge has signaled a surprise comeback after the health-care revamp struggled early with technical flaws in the websites built to sell it, and a Supreme Court ruling that undercut its planned Medicaid expansion. The deadline activity may mean the administration will reach its initial goal of 7 million enrollments for 2014.

Most agree the law’s rebirth won’t guarantee the president the momentum he is seeking to reboot his second term.

Obama’s approval ratings are stuck in the 40s. Democrats remain at risk of losing control of the Senate in November, which would give Republicans control of Congress and sideline Obama’s agenda for the rest of his presidency. And it may be months before the cost and coverage implications of the health- care overhaul are clear.

The enrollment surge “is great news but it’s not going to change the fundamental dynamics the administration’s facing,” Jim Manley, a Democratic strategist and former adviser to Senate Majority Leader Harry Reid of Nevada.

Manley said those dynamics include “a strong Republican opposition in both the House and the Senate and a real fear of what’s going to happen in the 2014 elections. And the serious challenges the country’s facing around the globe.”

Rep. Tom Cole, an Oklahoma Republican, said even though sign-ups were approaching 7 million, many enrolled “under duress” because their own policies had been canceled.

“This thing has never sold well,” Cole said Tuesday on MSNBC’s “Morning Joe” program. “I don’t think the issue goes away at all” in the November election. “I don’t see a lot of Democratic enthusiasm.”