The California Senate has narrowly approved a bill to encourage companies to give equal benefits to the spouses of gay employees.

Democrat Senator Christine Kehoe’s bill says that state agency contracts will only be awarded to companies who offer the equal benefits.

Ms Kehoe said the legislation would encourage equality. The bill applies to contracts over $100,000.

The bill just got the majority it needed to pass, with 21-15 votes. It will now go to the Assembly.

The legislation is supported by Equality California, which says Los Angeles, Sacramento, Oakland, Berkeley, San Mateo County, San Diego and Santa Monica already have the ordinances.

Interim executive director Jim Carroll said: “Studies have shown that employees who are treated fairly have higher retention rates and are more productive. The Equal Benefits bill both advances equality, benefits business and ensures that our precious tax dollars do not subsidise discrimination.”