The phone company Qwest Communications refused a proposal from the National Security Agency that the company’s lawyers considered illegal in February 2001, nearly seven months before the terrorist attacks on Sept. 11, the former head of the company contends in newly unsealed court filings.

The executive, Joseph P. Nacchio, also asserts in the filings that the agency retaliated by depriving Qwest of lucrative outsourcing contracts.

The filings were made as Mr. Nacchio fought charges of insider trading. He was ultimately convicted in April of 19 counts of insider trading and has been sentenced to six years in prison. He remains free while appealing the conviction.

Mr. Nacchio said last year that he had refused an N.S.A. request for customers’ call records in late 2001, after the Sept. 11 attacks, as the agency initiated domestic surveillance and data mining programs to monitor Al Qaeda communications.

But the documents unsealed Wednesday in federal court in Denver, first reported in The Rocky Mountain News on Thursday, claim for the first time that pressure on the company to participate in activities it saw as improper came as early as February, nearly seven months before the terrorist attacks.

The significance of the claim is hard to assess, because the court documents are heavily redacted and N.S.A. officials will not comment on the agency’s secret surveillance programs. Other government officials have said that the agency’s eavesdropping without warrants began only after Sept. 11, 2001, under an order from President Bush.

But the court filings in Mr. Nacchio’s case illustrate what is well known inside the telecommunications industry but little appreciated by the public: that the N.S.A. has for some time worked closely with phone companies, whose networks carry the telephone and Internet traffic the agency seeks out for intercept.

Some of the cooperation is related to the agency’s second major responsibility — the protection of classified government communications systems against eavesdropping or hacking by adversaries. The documents reflect constant meetings and negotiations between the agency and Qwest officials over the global communications network.

The claims could influence a battle in Congress over whether companies that assist the N.S.A. should be given immunity from civil or criminal liability. Some Democrats have opposed granting such immunity unless the Bush administration agrees to reveal more about the companies’ participation in eavesdropping and data mining programs.

You are already subscribed to this email.

As part of his defense, Mr. Nacchio claimed that he had knowledge of top secret contracts with the N.S.A. and other government agencies that made the company’s financial prospects brighter than was publicly known. Prosecutors denied the claims.

At the time of the claimed meeting at the N.S.A.’s Fort Meade, Md., headquarters on Feb. 27, 2001, Mr. Nacchio was chairman of the National Security Telecommunications Advisory Committee, whose members included top executives of most of the major communications companies. Like nearly every chief executive in the industry, he had been granted a security clearance to work with the government on secret projects.

In the court papers, Mr. Nacchio’s lawyers said he and James F. X. Payne, then Qwest’s head of government business, spoke with N.S.A. officials about the agency’s Groundbreaker project, in which the agency’s non-secret information technology would be contracted to private companies.

At the same meeting, N.S.A. officials made an additional proposal, whose exact nature is not made clear in the censored documents.

“The court has prohibited Mr. Nacchio from eliciting testimony regarding what also occurred at that meeting,” one of the documents states. Another passage says: “The court has also refused to allow Mr. Nacchio to demonstrate that the agency retaliated for this refusal by denying the Groundbreaker and perhaps other work to Qwest.”

Another document, a transcript of an interview that the F.B.I. conducted with Mr. Payne in 2006, stated that the N.S.A. pressed its request for months afterward. “Nacchio said it was a legal issue and that they could not do something their general counsel told them not to do,” Mr. Payne told the F.B.I. “Nacchio projected that he might do it if they could find a way to do it legally.”

Mr. Payne declined to comment.

In support of Mr. Nacchio’s accusations, his lawyers quoted from one of several lawsuits filed against telecommunications companies, accusing them of violating their customers’ privacy. That lawsuit, filed last year against several companies, asserts that seven months before the Sept. 11 attacks, at about the time of Mr. Nacchio’s meeting at the N.S.A., another phone company, AT&T, “began development of a center for monitoring long distance calls and Internet transmissions and other digital information for the exclusive use of the N.S.A.”

The lawsuit contends that the center would “give the N.S.A. direct, unlimited, unrestricted and unfettered access” to phone call information and Internet traffic on AT&T’s network.

A version of this article appears in print on , on Page A27 of the New York edition with the headline: Former Phone Chief Says Spy Agency Sought Surveillance Help Before 9/11. Order Reprints|Today's Paper|Subscribe