The woman behind a high-profile gender bias lawsuit against a major Silicon Valley venture capital firm testified Monday that a male colleague was "relentless" in his pursuit of her and cut her out of email chains and meetings when she broke off their affair.

Plaintiff Ellen Pao appeared calm and composed as she took the witness stand for the first time in the case against Kleiner Perkins Caufield & Byers.

The lawsuit has spotlighted gender imbalance in Silicon Valley venture capital and technology companies, where women are grossly underrepresented.

The elite investment companies are stacked with some of the nation's most accomplished graduates--multiple-degree-holders from schools such as Harvard and Stanford who are competing aggressively to back the next Google or Amazon.

Attorneys for the 45-year-old Pao have described Kleiner Perkins as an old-boys club where women were excluded from parties at former Vice President Al Gore's house and subjected by male colleagues to harassment and boorish behavior such as a conversation about porn stars and a trip to the Playboy Mansion.

Pao is seeking $16 million in damages after claiming she was passed over for a promotion because she is a woman and then fired later in 2012 after she filed a complaint and lawsuit.

Kleiner Perkins has denied wrongdoing and says Pao didn't get along with her colleagues and performed poorly after she became a junior partner in 2010.

In her testimony, Pao said she was given a poetry book by a senior partner in 2007 that featured drawings of naked women and poems on topics such as the longings of an older man for younger women. The partner also invited her to dinner one weekend while noting his wife would be out of town, she said.

"I thought it was strange, and it made me uncomfortable," she said.

Pao acknowledged having the affair with the male colleague and said she broke it off when she learned he had lied about the state of his marriage.

She said the colleague later retaliated by shutting her out of emails and meetings.

"He was relentless and eventually told me that his wife had left him," Pao told jurors.

When she raised the issue with management, a senior partner explained how he had met his wife at another company while he was married, and perhaps Pao could have the same outcome with her colleague, she testified.

Kleiner Perkins's attorneys have tried to portray Pao as a chronic complainer who demanded credit for work done by a team, clashed with her colleagues, and twisted facts and circumstances.

Her attorneys were trying Monday to dispute that portrayal and establish their client's credibility with the jury.

Steve Hirschfeld, an investigator hired by the firm to look into Pao's bias complaint, testified earlier in the day that she told him that her relationship with the male colleague was not consensual--a contention Hirschfeld did not find truthful.

Kleiner Perkins has said Pao did not complain about the book of poetry when she first received it. The firm also says the book was purchased by the wife of the senior partner who gave it to Pao, and she has mischaracterized the dinner invitation.

Pao said she wrote a memo to the firm in 2012 saying that women were being treated differently after it seemed that three female junior partners were not going to be promoted.

In addition, she noted that a female employee claimed she had been sexually harassed.

Hirschfeld said he concluded that Pao did not encounter any discrimination or retaliation at Kleiner Perkins.

Pao, however, said she was asked to leave the firm and told she was not welcome back after she filed the complaint and a subsequent lawsuit.

She is expected to testify for at least two days.

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.

John Doerr, a senior partner at Kleiner Perkins, previously testified that 20 percent of partners at the firm are women, and he has worked hard to recruit more women.