A trial is underway in a high-profile sex bias lawsuit captivating Silicon Valley.

In his opening statement Tuesday, a lawyer for plaintiff Ellen Pao said she was passed over for promotion because she was a woman and then fired after she complained.

Attorney Alan Exelrod described a male-dominated culture at venture capital firm Kleiner, Perkins, Caulfield & Byers — the defendant in the case.

He said Pao had received erotic poetry and sketches of nude women from a senior partner at the firm, and another male employee interfered with her work when Pao broke off an affair with him.

The firm denies wrongdoing and says Pao was a poor performer who didn’t get along with her colleagues.

An attorney for the firm was expected to give an opening statement later in the day.

Pao, 45, is seeking $16 million.

The trial in San Francisco Superior Court could last four weeks. The jury includes five men and seven women.

Regardless of who wins the trial, the case has shined another light on the issue of gender and racial bias in Silicon Valley in general and the venture capital sector in particular.

Venture capital firms provide much of the startup funds for tech companies and have a reputation as being even more insular and male-dominated than the companies they help launch.

“This case is a wakeup call,” said longtime Stanford University law professor Deborah Rhode, who teaches gender equity law. “The case has sparked a much-needed debate about gender inequality regardless of its merit.”

Women hold 15 to 20 percent of the technology jobs at tech giants Google, Apple, Facebook and Yahoo, according to company disclosures.

The companies acknowledge needing to do more to hire female engineers but largely attribute the problem to cultural issues that discourage girls and young women from taking classes needed to pursue careers in computer coding and website design.

Venture capital firms are even more slanted toward men. A 2011 survey by the National Venture Capital Association found women accounted for 11 percent of investors.

A study released last year by Babson College in Massachusetts found that women filled just 6 percent of the partner-level positions at 139 venture capital firms in 2013, down from 10 percent in 1999.

Kleiner fired Pao in 2012 — six months after she filed her lawsuit. Pao claims she was forced out because of her discrimination complaints. The firm counters that she was let go because of poor performance.

The firm had hired her in 2005 to serve as chief of staff for senior partner John Doerr, who helped direct early investments in Google, Amazon and a long-list of successful technology companies. Doerr is a Google board member and serves on President Barack Obama’s Economic Recovery Advisory Board.

Pao left the administrative position with Doerr in 2010 to become a junior partner with full-time investment duties.

Pao claims she was subjected to harassment and discrimination after ending a brief affair with a colleague. She was excluded from important meetings, email chains and company dinners because women “kill the buzz” of such festive occasions, according to the lawsuit.

Pao also claims a broader male-dominated culture at the firm, which counts former Vice President Al Gore as a senior partner, prevented her from excelling and advancing to senior positions.

Pao holds an undergraduate degree from Princeton University and graduated from the Harvard University law and business schools.

Her lawsuit seeks unspecified damages, but during a Feb. 2 court hearing, a lawyer for Kleiner told a judge that Pao is seeking $16 million for back pay and future wages lost.

The firm is seeking to limit any possible damages by arguing that Pao is well-compensated in her current position as interim CEO of the popular social media company Reddit and hasn’t suffered financially since leaving Kleiner after filing her lawsuit.

The firm denies Pao’s accusations and defends its record with women employees.

A judge rejected a previous request by Menlo Park-based Kleiner, Perkins to submit the case to an arbitrator for a closed-door resolution.

The company has made it clear in court filings that it intends to paint Pao as an unpopular underperformer often caught up in office drama who was paid more than many of her male peers.

“For some reason, there’s always some team controversy swirling around Ellen,” one of her annual reviews stated, according to a court filing by the firm. “At any moment in time, Ellen is not getting along with someone.”