Sen. Kamala D. Harris (Calif.), a Democratic presidential candidate, speaks at the National Urban League Conference on July 26 in Indianapolis. (Darron Cummings/AP)

Sen. Kamala D. Harris released a health-care plan Monday that reshapes her stance on the sharply divisive issue, proposing a government-run system that would allow private insurance as long as it follows Medicare’s coverage rules.

The plan is in many ways a middle ground between Sen. Bernie Sanders’s Medicare-for-all proposal and former vice president Joe Biden’s desire to build on the current system. The Sanders and Biden campaigns immediately took aim at Harris for her plan and for ostensibly changing her position on health care, setting up potential clashes on the subject at this week’s Democratic debate.

The proposal represents a pivot for Harris, who has previously suggested she fully supports Sanders’s plan Medicare-for-all bill and its goal of largely eliminating private insurance.

Harris, a California Democrat, told reporters in Detroit on Monday that she had adjusted what she still frames as a Medicare-for-all proposal after listening to voters on the campaign trail, many of whom worry about the notion of ending private health insurance.

“In terms of our Medicare-for-all plan, you know, look, I just realized that what was being offered was not enough,” Harris said. “And so I just decided, ‘You know what? We need to write our own plan.’ And that’s what I did.”

Harris had previously said private insurance should continue to exist only to cover supplemental medical expenses, such as cosmetic surgery, foreign travel insurance and other services not covered by Medicare.

But on Monday she said she would allow a variation of Medicare Advantage plans, private policies that offer the same services as Medicare but often use a provider network. Harris also wants to expand Medicare coverage to include vision and dental care, as well as hearing aids and mental health services.

“Under my plan, no one will lose access to insurance during a transition. Period,” she wrote in a post on the Medium website.

Harris told reporters she’d heard three main concerns about Medicare-for-all on the campaign trail: that it was too big to implement quickly; that it would require middle-class tax increases; and that “people don’t want government or anyone to take away their choices.”

Harris’s rivals argued that in trying to address those concerns while continuing to say she favors Medicare-for-all, she was trying to have it both ways.

Sanders campaign manager Faiz Shakir suggested that Harris was claiming the mantle of Medicare-for-all while advocating a far more modest policy.

“So continues her gradual backdown from Medicare For All,” Shakir tweeted. “This is why you want a candidate with a lifetime of consistency and a track record on the big issues facing us.”

Biden’s campaign said Harris’s plan makes little sense. In a statement, deputy campaign manager Kate Bedingfield criticized “this new, have-it-every-which-way approach” and accused Harris of “a refusal to be straight with the American middle class, who would have a large tax increase forced on them with this plan.”

Harris’s plan differs from Sanders’s in three major ways.

First, Harris says she would not force a transition to Medicare-for-all but would allow private insurers to continue offering plans that adhere to Medicare’s cost and coverage requirements. “If they want to play by our rules, they can be in the system,” Harris wrote. “If not, they have to get out.”

As soon as the plan is enacted, anyone could buy in to Medicare, and all newborns and uninsured Americans would be enrolled immediately.

Second, Harris’s bill would extend the transition period from four to 10 years.

Third, Harris calls for a less substantial middle-class tax increase than Sanders. His bill would fund Medicare-for-all with a 4 percent tax increase on all Americans making more than $29,000 annually.

Harris would raise that threshold to $100,000, paying for the difference with taxes on stock, bond and derivative transactions, and by taxing offshore corporate income at the same rate as domestic corporate income.

Harris on Monday credited Sanders for his work on the issue while acknowledging her differences with him.

“I applaud Bernie Sanders for pushing this conversation forward,” she said. “He has done, I think, a very important job of making sure this is a front-and-center topic.” Still, she added, “We have differences of opinion about what will actually achieve universal health care.”

Sanders will not share the debate stage with Harris on Wednesday night, but Biden will, giving him an opportunity to challenge her plan if he chooses. Harris has already faced criticism that she has a pattern of vacillating on her positions or backing off previous statements, including on health care.

In her first appearance at a CNN town hall, when Harris was asked about the shortcomings of private insurance, she responded, “Let’s do away with all that.” She later clarified that her vision of Medicare-for-all would allow private insurance for supplemental health concerns but not for basic coverage.

Then, on the second night of the first Democratic debate, Harris and Sanders were the only candidates to raise their hands when asked whether they would abolish private insurance. Harris later said she misheard the question and meant to say only that she would give up her own private insurance in favor of Medicare-for-all.

In recent weeks, Biden has accused Harris of wanting to do away with the Affordable Care Act, President Barack Obama’s signature domestic achievement, which most analysts view as a clear consequence of establishing a Medicare-for-all system. Harris has responded that she has been a staunch defender of the ACA in the face of Republican challenges, and that her plan simply builds on the ACA.

Harris often expresses frustration with the suggestion that she has flip-flopped.

“One of the problems with our politics is that it often demands 60-second sound bites or slogans to answer complex questions,” she wrote on Medium. “There is perhaps no more complicated or more personal issue for Americans than health care.”

Harris’s decision to release her plan Monday gives her a clearer position on health care in time for the second Democratic debate this week. Other candidates have also released plans on politically challenging topics in recent days, including Biden’s plan on criminal justice and a proposal by Sen. Elizabeth Warren (Mass.) on trade.

John Wagner contributed to this report.