A private consultant testified yesterday that former White House aide Oliver L. North wrote two phony letters to help create a misleading trail of documents to cover up the fact that retired Air Force major general Richard V. Secord had paid for a $13,873 security system for the North family house in 1986.

Glenn A. Robinette, a former Central Intelligence Agency electronics specialist who performed work for Secord last year, told the House and Senate select investigative committees yesterday that North wrote the fake letters in December -- dating them in May and October -- in response to fictitious bills that Robinette had sent him at North's request in early December.

This was just after Lt. Col. North had been fired from his job on the National Security Council staff and the Federal Bureau of Investigation had launched a criminal probe of the Iran-contra affair. The letters purported to reflect North's willingness to pay Robinette for the security system, which actually had been installed five months earlier. Secord paid $7,000 in May and $9,000 in August to cover the cost of the system and Robinette's commission, according to Robinette's testimony. The $9,000 payment came from profits from the secret sale of U.S. arms to Iran.

By receiving the security system as a gift from Secord, North would have violated a federal law that forbids federal employes to accept gratuities.

Robinette, testifying under a grant of limited immunity from prosecution, said that he was "surprised" in early December to receive a call from North requesting a bill for the security system, but assumed that the request must have been connected to the well-publicized trouble North was then in. Robinette obliged by concocting a fake, backdated bill and follow-up dunning notice, placing both in a single sealed envelope and mailing it in another envelope to North, in care of his attorney.

Within a week, Robinette testified, North mailed him two phony, backdated "responses" in a single envelope, both of which referred to what Robinette described as an idea invented by North that in lieu of payment, North would make his house "available for commercial endorsement of your firm and the equipment without fee."

The Robinette testimony appeared to surprise even North's most ardent supporters on the committees. One longstanding backer, Sen. Orrin G. Hatch (R-Utah), said the day's testimony gave him "feelings of being let down."

From other testimony yesterday, the committees also learned that:

Three anonymous contributions from Swiss bank accounts totaling $500,000 were received in recent weeks by a legal defense fund set up for Secord. The source of the money was unknown, according to Noel C. Koch, a former Pentagon official who testified yesterday that he had resigned as a trustee of the Secord legal defense fund because "anonymous money" from a Swiss bank "had a peculiar odor to it."

A $9,000 check that Robinette said was reimbursement for North's security system came from funds generated by the U.S.-Iran arms sales. Documents presented by the committees showed that the money, transferred to this country at Secord's direction, was taken from a Swiss bank account generally used to finance airlift operations for the Nicaraguan contras. The remaining $6,000 that Robinette said he got from Secord for the security system was handed over in cash.

Secord hired Robinette in March 1986 to develop "derogatory" information about several individuals from the Christic Institute who were preparing a lawsuit against Secord and other former Defense Department and CIA officials. Robinette testified that on one five-day trip to Costa Rica last November he passed out at least $7,000 to informers.

Robinette's appointment calendar contained frequent references to the FBI, and a July 19 notation about "Buck Revell," an apparent reference to the FBI's executive assistant director, Oliver B. (Buck) Revell. But questions on this reference from Rep. Louis Stokes (D-Ohio) were cut off when Robinette's attorney, Mark H. Tuohey III, announced he was advising his client not to answer in an open session, and Senate committee Chairman Daniel K. Inouye (D-Hawaii) supported this procedure.

Secretary of Defense Caspar W. Weinberger, who was openly critical of the plan to sell arms to Iran in return for securing the release of American hostages in Lebanon, appeared to harbor concerns about the legality of the action. When Koch half-jestingly asked the secretary whether "we have a legal problem with this -- is somebody going to jail?" Weinberger responded "in the affirmative -- but I didn't take that seriously," Koch testified.

North told then-Deputy Assistant Secretary of Defense Koch in the fall of 1985 that the continued detention of American hostages was "really eating" President Reagan and "he's driving me {North} nuts about it." Koch quoted North as saying Reagan wanted the hostages "out by Christmas."

There was still no resolution yesterday of the impasse that has raised questions about whether North will testify before the congressional committees. The impasse has developed over the arrangements for North's appearance, first in a closed-door session, to answer preliminary questions and later in public.

Both select committees met separately yesterday to consider proposals that the panel leaders discussed Monday with North's lawyers. But they failed to agree on whether to formally extend to North the concessions accepted by committee leaders but viewed unfavorably by some members who fear they would establish a precedent for witnesses subpoenaed in future investigations.

These include voluntary limits on the length and subject matter of North's closed-door appearances, and an agreement to let North testify in public before the appearance of his former boss, Rear Adm. John M. Poindexter, who resigned as national security adviser when North was fired last November.

Testifying yesterday, Robinette told a markedly different story than in March, when news reports first linked him to the security system installed in mid-1986 at the North house in Great Falls, Va., which is set back off a road in undeveloped countryside.

Robinette said then that the equipment cost $2,000 and that he had paid for it himself, adding he hoped North might steer some business his way. He also said he hoped North eventually would pay him for it.

Under oath yesterday, he said he had never asked North to pay and that he was unaware if North had ever been told what the final cost of the system had been. And when North requested the bill in the first week of last December, he said, he did not tell him that it had already been paid.

Robinette said Secord first raised with him the possibility of a security system for the North house in April 1986, citing harassment of the Norths including telephoned threats, lights shined into the house from the road at night, garbage in the mailbox and slashed tires.

He said he met Betsy North the next day when he surveyed the house. He found her a "lovely lady" who was uneasy about her family's security, particularly because North traveled frequently and came home late.

Subsequently, Secord arranged for Robinette to discuss the matter with North at the National Security Council official's Old Executive Office Building suite. Robinette said he assured North he understood the Great Falls residence was "a home, not a SAC {Strategic Air Command} base."

They met again a few days later at Secord's office. Robinette described his proposed system and indicated a cost of $8,000 to $8,500. North urged him to keep costs down, adding, "Remember, I'm a poor lieutenant colonel," Robinette testified.

But Robinette said he never billed North. Instead, he said, he went to Secord and "simply told him what I was expecting to be paid, what I had incurred. He appeared to consider it as another one of my expenses."

In May, he testified, Secord gave him $7,000 in cash from a drawer in his desk or from a briefcase. In August, he received a payment of $9,000 in the form of a cashier's check authorized by Secord.

Secord confirmed yesterday that he had put Robinette in touch with the Norths, but asserted that "he never came to me for any money for that." Secord said that the $16,000 was for "money we owed him" as a consultant. "On his own he decided to install a fence and a system -- then his costs escalated," Secord said.

Robinette at first said that when he decided after North called him in December to send North a phony bill he was acting with his "heart," out of compassion for North, a man caught in the "middle." But under prodding from committee members Robinette added that he was also attempting to protect Secord, who was giving him the bulk of his income in 1986.

"I think my principal objective, my point was to assist, help Col. North," he said, "but it's certainly true that it would assist Gen. Secord."

"The purpose of those phony bills was to cover up what you were aware was at least wrong and possibly illegal," Sen. George J. Mitchell (D-Maine) asked.

"That's correct, sir," the witness said.

Robinette's testimony on his cover-up decision provoked several expressions of skepticism -- and frustration -- by committee members who appeared to be reflecting increasing impatience with the withholding of information by witnesses who have been granted immunity.

Rep. Peter W. Rodino Jr. (D-N.J.) said he believed it was time that immunized witnesses "don't dissemble when they do come . . . . Otherwise this is going to be an exercise in futility."

North's letters, which were backdated to May 18 and Oct. 1, appeared to have been concocted in order to make a casual reader believe that time had passed between their writings.

The first letter was formal, and used contractual terminology. The second was informal and contained references to North's children. It also contained a "mistake" in North's home address, and several characters on the typewriter used to write the letter appeared to have been damaged.

By Robinette's testimony, the demise of the cover-up effort came with the news reports in March. Within hours, North asked him to bring copies of the fake bills to the office of his attorney. There was no discussion of the fabrication at that time. Later that day Secord asked Robinette about the matter.

"Well, you sent bills to Col. North, didn't you," Robinette quoted Secord as asking.

When he nodded yes, he quoted Secord as saying, "Well, you did the right thing."

But a few minutes later North's attorney, Brendan V. Sullivan, called and told him, "Don't protect Col. North, he's a big boy." Sullivan then added that Robinette should tell the truth and get his own attorney.

"All of this sounded rather conclusive to me -- and threatening -- meaning my future," Robinette told the select committees. Secord recalled Robinette telling him he had sent North a bill but, "I said I'm not interested in seeing it."

The revelations about $500,000 in contributions to Secord's legal defense fund from Swiss bank accounts took the committees by surprise.

Koch said the fund had raised money in small amounts until the sudden deposits from Switzerland. He said Secord told him he didn't know where the money came from and neither did Middleton Martin, a Washington attorney who was the other trustee of the fund.

"He {Martin} shared my bafflement at our extraordinary success," Koch said.

Martin said in a telephone interview yesterday that he didn't think the $500,000 -- which came in three separate deposits of $200,000, $200,000 and $100,000 -- came from profits on the sale of weapons to Iran because "it is my understanding that those accounts are frozen."

He said bank officials "could find no information about the remitting party."

Koch also disclosed yesterday that he had approved a payment of about $93,000 from the Secord fund to pay some of his legal fees. Thomas C. Green, Secord's attorney, could not be reached for comment yesterday.

Secord himself denied in a telephone interview that any frozen funds went to the legal fund. He said he was not sure who his benefactors were.

Koch, Secord said, had told him he was resigning prior to his testimony yesterday to avoid an appearance of conflict of interest.

Koch, however, said that the anonymous money "had a taint about it, but definition . . . . For Gen. Secord, you'd have to assume that there was -- numbers of that magnitude, from that particular source, from a Swiss bank, had a peculiar odor to it."

Staff writer Charles R. Babcock contributed to this report.