A FEMALE executive at tech giant Yahoo is being accused of coercing a staff member into having sex with her and allegedly threatening her with being fired if she didn’t.

Maria Zhang allegedly pressured a female staff member, Nan Shi, into sex —but then turned on her and gave her bad performance reviews, according to a lawsuit Ms Shi has filed a lawsuit against her former boss.

Ms Shi alleges that when she reported the behaviour to Yahoo the company put her on unpaid leave and then fired her.

Reuters reported Yahoo was named as a defendant in the case.

The lawsuit says: “Zhang told [Ms Shi] she would have a bright future at Yahoo if she had sex with her. She also stated she could take away everything from her, including her job, stocks, and future if she did not do what she wanted.”

“I was in a deep sleep one morning, sleeping on the sofa because she had taken my bed, when she came in without clothes on, crawled into my blanket, and woke me up, hugging me, kissing my face and neck,” she said.

“I woke up and got scared; I was shocked. I said, ‘what are you doing?’ She said she’d liked me a long time, but I didn’t feel the same toward her. I said ‘come on, we’re friends; I love you as a person, but not as a lover’.’’

Court documents seen by the San Jose Mercury News allege Zhang forced her subordinate to work gruelling hours and write work emails in her off-time, “sometimes right after sex”.

It will be alleged Zhang “coerced” Ms Shi into having oral and digital sex against her will on a number of occasions.

The two lived together for a time after Ms Shi alleged her boss “ordered” her to live with her in Yahoo housing in Sunnyvale, California.

Both women joined Yahoo last year when it bought a start-up company Ms Zhang founded.

Yahoo is supporting Zhang and has said it will “fight vigorously to clear her name” because there was “ absolutely no basis or truth to the allegations against Maria Zhang”.