The Massachusetts minimum wage will rise to $15 an hour over five years, and a new paid family and medical leave program will be introduced, under a bill Gov. Charlie Baker signed into law on Thursday.

The measure also mandates an annual August sales tax holiday weekend.

The so-called "grand bargain" was designed to keep several ballot questions — including a proposal to cut the Massachusetts sales tax — off the November ballot.

In a statement, the Republican Baker said he was thankful that all parties came together on "a better set of policies than what the ballot questions represented."

Massachusetts is now the third state — after California and New York — with a pay floor on the way to $15 an hour.

The Massachusetts Budget and Policy Center, which advocates for higher minimum wages, has estimated that a quarter of the Massachusetts workforce — about 840,000 workers — would see raises as a result of a $15 minimum wage by 2023.

Baker's signature Thursday came almost exactly four years after then-Gov. Deval Patrick, a Democrat, signed a law outlining an $11-an-hour pay floor. At the time, the stepped-up hike to $11 was a high among states.

Opponents of higher minimum wages say they just increase labor costs, which force employers to then raise prices and/or cut other wages, benefits or jobs. Some proponents of higher pay floors also worry about the untested $15 minimum in locations outside high-cost labor markets.

The new law will also raise the minimum wage for tipped workers, over five years, to $6.75.

In addition, the measure — over the same five years — phases out time-and-a-half pay for Sunday and holiday hourly workers. Massachusetts and Rhode Island are the only states that mandate time-and-a-half for Sunday workers.

Here's how the paid leave program would work: Employees would be allowed to take up to 12 weeks of paid leave to care for a family member or bond with a new child, and take up to 20 weeks to deal with a personal medical issue.

"Weekly benefit amounts," the governor's office said in a statement, "will be calculated as a percentage of the employee’s average weekly wage, with a maximum weekly benefit of $850."

The $800 million paid leave program will be financed by a new 0.63 percent payroll tax split roughly by both employers and employees.

The "grand bargain" compromise came together quickly after the state high court ruled that a proposed ballot question pairing a surtax on income over $1 million with spending on transportation and education initiatives was unconstitutional.

That "millionaire's tax" effort was pushed by Raise Up Massachusetts, a labor-led coalition. But, as State House News Service reports:

Thursday's signing of the grand bargain further establishes Raise Up as a force on Beacon Hill, having successfully fought for the last minimum wage increase, an earned sick time ballot law and now having secured another minimum wage increase and the establishment of the paid leave program.

In a statement before the signing Thursday, the group said: "Because of the incredible work of dozens of grassroots organizations and thousands of volunteers who collected signatures to qualify our questions for the ballot, Massachusetts workers will have a $15 minimum wage and the strongest, most progressive paid family and medical leave program in the nation."

The "grand bargain" bill was approved 126-25 by the House and by the Senate on a voice vote.

With reporting by The Associated Press