(Reuters) - San Francisco became the first U.S. city to mandate six weeks of fully paid parental leave, requiring employers to shoulder much of the cost and exceeding federal and state benefit rules for private-sector employees, a city supervisor said on Tuesday.

A woman walks with a child stroller across a pedestrian crossing, in San Francisco, California February 19, 2014. REUTERS/Robert Galbraith

The law, unanimously approved by the San Francisco Board of Supervisors, grants six-week leave for fathers and mothers working for companies with 20 or more employees, nearly doubling the pay they are now eligible to collect under California law.

“Our country’s parental leave policies are woefully behind the rest of the world, and today San Francisco has taken the lead in pushing for better family leave policies for our workers,” Supervisor Scott Wiener said in a statement.

Better benefits for parents are part of campaigns across the nation aimed at combating rising income inequality. California’s governor on Monday signed into law a bill raising the state’s minimum wage from $10 to $15 an hour by the year 2023.

San Francisco already offers 12 weeks of fully paid parental leave to its approximately 30,000 city employees.

On Monday, New York’s governor signed a bill granting 12-week paid family leave for private-sector workers that will phase in by 2021. California and New Jersey provide up to six weeks of partial pay, while Rhode Island offers four, according to the National Conference of State Legislatures.

Under the San Francisco policy, effective in 2017, employers must pay 45 percent of wages for as long as six weeks. The remaining 55 percent of weekly wages comes from a worker-funded state disability program.

Payments are calculated as a percentage of wages up to an annual ceiling of $106,740.

Supporters said it will enable new parents to spend more time with their babies, while opponents said it would hurt profits and cost jobs.

In 2014, about 5,000 San Francisco residents accessed the state’s program for paid family leave for an average of 5.4 weeks, according to state data.

Nationally, 12 percent of workers receive paid family leave through their employers, Wiener’s office said.

Technology companies in Silicon Valley have increased family leave benefits to help recruit and retain employees. Netflix Inc provides up to a year paid, while Facebook Inc provides four months and Microsoft Corp offers eight weeks.

Federal law provides up to 12 weeks of unpaid leave to care for a newborn or adopted child for employees at companies with 50 or more workers.