The Massachusetts Senate unanimously passed legislation Thursday mandating protections for pregnant workers, an effort that came up short on Beacon Hill last session but now appears poised to become law.

The Senate passed the so-called Pregnant Workers Fairness Act (S. 2093) filed by Sen. Joan Lovely by a 38-0 vote after about half an hour of debate.

"This legislation represents a shared commitment by both workers and businesses to support equal opportunities for pregnant women in the workplace," Lovely said in her introduction of the bill on the Senate floor. She added, "Pregnant women who need income but are not granted accommodations are often forced to continue working in hazardous conditions, risking their own health and the health of their pregnancy. By ensuring reasonable accommodations for pregnant workers, we can help keep these women in their jobs and earning a paycheck, providing stability for countless families across the commonwealth."

Lovely said three-quarters of women in America will become pregnant at some point during their working lives, and in Massachusetts, more than half of all pregnant women and new mothers are in the workforce.

The bill offers pregnant women reasonable accommodations, including "more frequent or longer paid or unpaid breaks, time off to recover from childbirth with or without pay, acquisition or modification of equipment, seating, temporary transfer to a less strenuous or hazardous position, job restructuring, light duty, break time and private non-bathroom space for expressing breast milk, assistance with manual labor, or modified work schedules." The accommodations come with a caveat as the bill requires them as long as they "would not impose undue hardship on the employer."

It also prohibits employers from refusing to hire a pregnant woman solely because she requires a reasonable accommodation. Employers would not be permitted to force pregnant employees to accept an accommodation that she does not want or to take leave if another reasonable accommodation could be provided.

There appears to be very little in the way of the Pregnant Workers Fairness Act becoming law in Massachusetts. A similar bill cleared the House unanimously in May and Gov. Charlie Baker, who is sometimes reluctant to discuss pending legislation, indicated he would sign the legislation if it reaches his desk.

According to MotherWoman, an advocacy group that has led the lobbying charge to enshrine these protections into law, 21 other states and the District of Columbia have taken legislative action to make sure employers provide accommodations for pregnant workers.

Though business groups had opposed a similar bill last session, the Associated Industries of Massachusetts announced in March that it reached an agreement with MotherWoman on consensus legislation, which Lovely and Rep. David Rogers filed. On Thursday, MotherWoman pointed to the Senate bill's nine-month delay on implementation as something advocates and business groups agreed to in order to facilitate businesses preparations.

"When we started this journey two years ago, MotherWoman and her allies knew that too many pregnant women were struggling without reasonable accommodations commonly given to other workers," Linda O'Connell, acting executive director of MotherWoman, said in a statement. "Massachusetts legislators on both sides of the aisle heard us. The business community heard us, also. We are lucky to live in a state that can solve genuine problems for its people."

MotherWoman said its coalition of supporters includes the ACLU of Massachusetts, AFL-CIO of Massachusetts, Alliance for Business Leadership, MassCOSH, Mass. Caucus of Women Legislators, Mass. Commission on the Status of Women, Mass. Alliance for Teen Pregnancy, Mass. Employment Lawyers Assoc., Mass. Women's Bar Assoc., NARAL Pro-Choice Massachusetts, and Planned Parenthood Advocacy Fund of Massachusetts.

The bill passed Thursday by the Senate and the bill that cleared the House last month are similar, but they do differ in some places. Lovely said after the Senate's vote that it is not yet clear whether the two bills will go to a conference committee to be reconciled.

"We'll see if it needs any type of conference committee oversight, we're not really sure at this point," she told reporters. "The bills are so close."