The Washington State Legislature passed one of the most generous paid leave bills in the country on Friday, laying the groundwork for up to 18 weeks of guaranteed paid leave per year for workers. Gov. Jay Inslee called the bill an “amazing achievement” and indicated that he will soon sign it into law.

The bill’s passage marks the end of a decadelong headache for Washington paid leave advocates who saw a decent plan passed in 2007—long before any other state approved such legislation—but never implemented. That bill would have given new parents $250 a week for five weeks of leave, but legislators never agreed on a way to fund it.

In the 10 years since, five other states have passed paid leave programs, and public opinion has leaned heavily in favor of employer- and government-sponsored leave. So when legislators came back to the table to discuss a new paid leave plan, Republicans and Democrats each proposed bills that would be far more substantial than the 2007 measure. After much negotiation, legislators landed on a plan for insurance that will give workers up to 12 weeks of paid leave to care for a new child or ailing family member, starting in 2020. It also provides for up to 12 weeks of paid medical leave for a worker’s personal health crisis, but total annual leave will be capped at 16 weeks (18 weeks for new mothers with pregnancy-related medical complications). Workers will be paid 50 percent of their wages above the state’s weekly average wage ($1,082) and 90 percent of their wages below that threshold, with a weekly cap of $1,000. Workers must have worked 820 hours in the previous year—less than half-time—to qualify.

Though Democrats had initially put forth a plan that would have given workers 26 weeks of paid family leave, the more modest passed legislation still amounts to one of the best deals in the country. New Jersey and California give new parents six weeks of partially paid leave; Rhode Island and D.C. offer four and eight weeks, respectively, though D.C.’s bill won’t take effect until 2020. New York passed what was then the country’s best paid leave bill last spring, offering a plan that will phase up over the next four years to 12 weeks of leave paid at up to two-thirds of the state’s average wage.

Washington’s bill will do far more for lower-income residents, which is essential to the bill’s efficacy: If a New York worker can’t afford to support her family on two-thirds of the average wage, she won’t take leave at all. The Washington plan’s sustainability is bolstered, too, by its funding mechanism. Both employers and employees will pay into the social insurance fund: An employee making $50,000 a year will pay $2.42 a week, while his employer pays $1.42. If he takes leave, he’ll get about $703 a week. Businesses with 50 or fewer employees can opt out of the employer pay-in, and companies that already offer paid leave that’s at least equivalent to the state offering are exempt from the program. That didn’t stop one Republican representative from calling the bill “one step toward a socialist state government.”

There’s one other major difference between Washington’s plan and the others. Washington residents will be able to take their paid leave to deal with a “qualifying exigency” caused by the military deployment of a spouse, child, parent, or domestic partner. This demonstrates a laudable commitment to helping people keep their jobs in trying times, an effort that will also yield mounting returns for the state’s economy.