Few laws have defied as many existential threats as the Affordable Care Act. A few hours ago, it survived again.

In seven years, it has been to the brink of elimination nearly a dozen times, only to rally back from seemingly impossible odds. Efforts to kill it have come from Congress (including one in 2015 that made it all the way to President Barack Obama’s desk before being vetoed), the White House and the courts. The latest — a repeal bill in the Senate that fell apart, 51-49, with Sen. John McCain (R-Ariz.) casting a decisive vote — occurred Friday in the early morning hours.

Here is a timeline of the ACA’s “near-death” experiences, which occurred before the bill passed, during its implementation and after benefits began to flow.

Correction: This timeline has been updated to correct the date of the Supreme Court ruling about subsidies.

Update: This timeline has been updated to include the events of July 28, 2017.