Congressional Republicans’ first serious attempt to repeal and replace the Affordable Care Act suffered a crushing defeat Friday with the last-minute cancellation of a House vote on the GOP proposal. While this is a serious setback for President Trump’s agenda, the young administration and its congressional allies should not back away from the critical work of reforming the nation’s costly, complex health care system.

The plot twists and emotional debate over the American Health Care Act (AHCA), the name given to the GOP’s health overhaul, provided enough drama over the past few weeks to rival a reality TV show. Deal sweeteners, such as ill-advisedly weakening “essential benefit” requirements for insurance plans to appease hard-line conservatives, appeared to backfire as moderate Republicans pulled their support.

The deeply flawed AHCA did not merit passage, and it was disappointing to see that Minnesota Republican Reps. Erik Paulsen and Jason Lewis strongly backed the bill. The AHCA would have increased the number of uninsured Americans by 24 million by 2026, according to the Congressional Budget Office. Older people, such as young retirees, would have faced steeper costs. The call to reduce federal Medicaid funding would have jeopardized seniors’ nursing home coverage.

Democrats shouldn’t celebrate the setback. Obamacare has flaws, too, as soaring premiums in Minnesota’s individual insurance market painfully attest. The takeaway from Friday is not that the status quo is fine. Instead, it’s that health care reform is so complex that one party can’t do it alone. Bipartisanship is essential.

Trump likely has little appetite for tackling health care again soon. But the nation’s dealmaker-in-chief should understand the power of time and persistence. Expanding the ranks of allies also helps, which is why he should reach out to Democrats and medical industry groups to find reforms that better balance cost and coverage. Democrats should have a list of serious proposals ready to go.

Health care needn’t be a permanent setback for Trump. The issue is frustratingly complex, but there will be a place in history for a leader who didn’t back down and instead forged ahead to find teamwork and solutions. Trump could, and should, rise to the challenge.