IBM failed in its bid to avoid a trial on claims by a California woman that she was illegally laid off while out on maternity leave, a federal judge ruled.

A jury must decide if May Moua was subjected to discrimination and retaliation based on pregnancy, and whether International Business Machines Corp. also violated California family rights and disability leave laws, the state constitution, and public policy, the U.S. District Court for the Northern District of California said March 22.

The company argues that Moua was included in a 2009 workforce reduction, prompted by legitimate business needs, because she...