A former high-level Credit Suisse executive said she was terminated after refusing to mislead auditors scrutinizing a joint venture between the bank and the big-data firm Palantir Technologies, according to filings in a federal administrative action obtained via FOIA by NBC News.

Colleen Graham, a 20-year employee of the Swiss-based bank who rose to head its compliance unit in the U.S., alleged in her complaint, which was filed with the Department of Labor, that the bank wanted her to bend the rules to avoid multimillion-dollar losses for itself and Palantir. The companies had launched a joint venture called Signac LLC, co-headed by Graham, which was developing software to police Credit Suisse's traders and wealth managers worldwide.

In an interview with NBC News, Graham said she began to experience bullying and harassment — including encounters outside work — immediately after she objected to the effort to mislead KPMG, the firm auditing the joint venture. "I was scared for my safety and the safety of my family."

Graham said she was shut out of meetings, including those concerning Signac, on whose board she sat. The joint venture refused to pay her 2016 bonus, she said, adding, "I was subject to a 'walk around the block' where I was told that a colleague of mine might be terminated if he did not go along" with the plan to bend the rules.

Credit Suisse, based in Zurich, is a multinational bank and financial services company with significant operations in the U.S. Palantir, a secretive Silicon Valley "unicorn" co-founded by famed investor Peter Thiel, is a privately held data-mining company. It had been preparing to issue stock to the public, possibly this year, but those plans have been postponed.

For decades, big banks have been plagued by losses associated with rogue traders. In 2015, for example, a Credit Suisse wealth manager named Patrice Lescaudron was discovered to have falsified trades and hidden customer losses totaling more than $150 million. Lescaudron was convicted and sentenced to prison.

Palantir and Credit Suisse invested a total of $40 million in the Signac venture to develop policing software. Because Signac's profits and losses flowed through the financial statements of both Credit Suisse and Palantir, the complaint said, Signac's accounting affected both companies. Graham was Signac's chief supervisory officer for a little over a year, the filings said.

"Signac solved a critical issue in the industry and drove down compliance costs," Graham said. "The regulators thought this was a home run and Credit Suisse touted the Signac software publicly."

In spring 2017, Signac was working to perfect the software, Graham contended in her complaint, when executives at Credit Suisse and Palantir became upset. They had learned that the bank would have to take a significant loss in 2016 and Palantir would have to reduce its internal valuation, under software accounting rules. Those rules require companies to recognize revenues once their products have been delivered to customers and are in use.

Emails produced in the case show that Palantir's net income would have been reduced by $10 million under the accounting rules and the value of its investment would decline by $5.5 million. The impact on Credit Suisse was estimated at a penny or two per share, which is significant for such a large company.

Credit Suisse and Palantir asked Graham to convince the auditor, KPMG, to avoid the problematic consequences, the filings said, by booking the revenues improperly in 2016. Shortly after she refused, she was fired and blackballed in the industry, she said in her claim, which was filed in 2017.

She also alleges in her filings that she was followed when she went to an interview with another financial services firm, which she believes was done to intimidate her.

Credit Suisse and Palantir have disputed Graham's complaint, saying in response that she was never pressured about Signac's accounting methods and that she was removed from her job at Signac when it was dissolved as a failure.

"Credit Suisse has fully prevailed on this matter multiple times, in separate venues, and in each case all of the claims were dismissed," a bank spokeswoman said in a statement. "Credit Suisse has conducted thorough and comprehensive internal investigations into every one of Ms. Graham's claims and found them to be entirely baseless. We will continue to vigorously defend this matter and refute all these allegations in any forum."

Palantir did not immediately respond to an email seeking additional comment.

Credit Suisse and Palantir wound down Signac shortly after the accounting dispute, saying it was a "complete bust." But internal Credit Suisse and Palantir emails included in Graham's filings indicate that the surveillance software developed by Signac was viewed inside the alliance as promising. One email sent shortly before Signac was dissolved said "the products we're building are actually awesome" and that the top Credit Suisse executive overseeing the venture believed the software was "quite valuable."

Signac and Credit Suisse officials were confident enough in the surveillance software that the company demonstrated the product to regulators at the Securities and Exchange Commission, the Swiss Financial Market Supervisory Authority and others in early 2017, Graham told NBC News. They liked what they saw, she added.

Graham's case is pending and will be heard by an administrative law judge at the Labor Department.