The CIA planned to use a remote resort hotel in Nags Head, N.C., in 1961 as a "safe haven" for Cuban defectors and Cuban refugees from the Bay of Pigs invasion, a former CIA employee accused of espionage testified at his trial today.

Edwin Gibbons Moore II told the jury that the "government" agreed to pay off his mortgage on the hotel in exchange for being able to use the facility as a safe haven.

The government also agreed to "bring in bottled gas (for heat), rewire the place, and do considerable repair work" on the property, which included a three-story hotel and 20 adjoining cottages, Moore testified.

Moore, 56, a Bethesda resident, is accused of trying to sell classified CIA documents to the Soviet Union and has pleaded innocent by reason of insanity. He took the stand for the first time in his defense today, detailing what he said were his connections to the CIA at the time he owned the Nags Head hotel complex.

Moore was attempting to show that he had clandestine arrangements with the CIA prior to December of last year when he was arrested and charged with attempting to sell secret documents to the Soviet Union. Defense testimony thus far has shown that Moore claims he was put up to the attempted sale in December by a man who he believes worked for the CIA.

Moore testified that the plan to use the hotel complex was first broached to him "by someone I didn't know." Moore, a CIA employee at the time, was to live on the hotel property, though he was to be segregated from part of the complex by a chain-link fence within which CIA activities were to take place, he testified.

Moore said the CIA sent him to the "Lewis Hotel Training School" in anticipation of his management of the property on behalf of the CIA. The defendant said that it was while he was studying at the hotel school he learned of a fire "of suspicious origin" at the hotel. The fire destroyed the "third story of the main building and two separate cottages."

"It looked like an inside job to me," Moore testified. "You'd think the fire would have started from the ground up. And also there were two separate (detached) cottages burned. It seemed strange," he said.

Moore was accused of arson in the matter, tried and convicted, and then ultimately acquitted of the charges in 1967 after a successful appeal.

Moore said his unidentified CIA contract was especially interested in the "dining room set up for meetings" at the Nags Head property. The contact was also interested in possibly using a large family home Moore owned in Elm City, N.C., for the same purpose, Moore testified. Additionally, he testified that the CIA was conducting a similar operation in the field of "explosives experimentation" in the Harvey's Neck area of Edentown, N.C., and that his hotel might be used as a "diversionary tactic," he said.

Moore, who joined the CIA in 1951 as a GS-5 office worker in the Soviet materials section, was placed on leave without pay when he was charged with the arson in 1961 and was fired when he was convicted in 1963. He rejoined the CIA after his subsequent acquittal in 1967.

During the years away from the CIA, Moore testified, "Ic ouldn't get a job. Every time an employer asked the CIA for a reference, they (the CIA) didn't know anything about me . . . when they rehired me my records were changed to show to break in service."

Moore said he received more than $38,000 in back pay with a check drawn on the Schroder Trust Co. in New York, although all of his previous paychecks had been issued by the U.S. Treasury.

The jury also heard testimony today from Patricia S. Paxton, a clinical psychologist called by the defense. Paxton said Moore had a "superior" IQ of 123, and that the "cumulative" results of tests she administered showed Moore to suffer from a "paranoid psychosis." Such people, she said, can function normally in all aspects of life except in the area of their delusion.