A close associate of Roberto D'Aubuisson, leader of El Salvador's far right political wing, was one of three men arrested at a remote Texas airfield last week with nine suitcases containing more than $5.9 million in small bills, U.S. Customs Service officials said yesterday.

El Salvador's ruling Christian Democratic Party, locked in a bitter struggle with D'Aubuisson's Arena Party over next month's municipal and legislative elections, immediately charged that the money was obtained illicitly and would be used by Arena "to corrupt the electoral process."

Customs officials said they arrested Francisco Guirola Beeche, 35, and two other men on Feb. 6 as their small Sabreliner private jet was refueling at the Kleberg County airstrip near Kingsville, about 35 miles southwest of Corpus Christi near the Gulf Coast.

Guirola, carrying two passports from El Salvador and one from Costa Rica, is a wealthy Salvadoran conservative with citizenship in El Salvador and Costa Rica who travels frequently to the United States.

He claimed that diplomatic immunity protected his nine suitcases from a search, according to Donald G. Turnbaugh, assistant regional commissioner for enforcement at the Customs Service's Houston office. "I think he was counting on that," Turnbaugh said.

But Guirola did not have diplomatic immunity and agents found that the suitcases contained $5,975,850 in U.S. currency, with the largest bills being $100 denominations, Turnbaugh said. He called it the largest currency seizure in Texas history.

"We believe they were headed out of the country," Turnbaugh said. He said that the plane had left John Wayne Airport in Los Angeles the morning of Feb. 6 on a flight plan to Kingsville and Florida and that Customs Service officials in California had warned the Texas office of the flight because the plane once before failed to follow its flight plan and had flown to El Salvador.

Turnbaugh said the pilot, Gus Maestrales of Boca Raton, Fla., "was known as a possible contraband exporter." He, Guirola and Oscar Rodriguez Feo were charged with transporting undocumented cash and conspiracy and are being held at the Corpus Christi jail in lieu of $1 million bond. A hearing is scheduled on Tuesday.

An investigative team of FBI, customs and the Drug Enforcement Administration agents has been formed to work on the case, Turnbaugh said. Although there is no apparent drug connection, drug deals usually involve large amounts of cash in small bills.

A possible drug ring involvement is "certainly one of the things being investigated," a State Department official said.

Guirola is known as a close associate and financial backer of D'Aubuisson, and has allowed D'Aubuisson to use a floor of a building he owns in San Salvador as an Arena office, according to State Department officials. The Guirola family has been strongly opposed to Salvadoran President Jose Napoleon Duarte since 1979, when the first Duarte government expropriated and nationalized a large bank, the Banco Salvadoreno, that the family owned.

There also are reports that Guirola was instrumental in the formation of the Broad National Front, FAN by its Spanish initials, a rightist umbrella organization that includes Arena and two splinter parties.

Arena is seeking in the March elections to expand its domination of the Salvadoran legislature, where Arena and a coalition of conservatives have been largely successful in blocking Duarte initiatives. Duarte is counting on a large popular vote in March to gain control.

In major newspaper advertisements Feb. 12, the Christian Democratic Party charged that Guirola was bringing in money "to supply support for his comrades who intend to corrupt the electoral process of our country . . . to buy votes, promote political chaos and other misdeeds in order to mistreat and ridicule our suffering people."

Reagan administration officials could scarcely conceal their glee at news of Guirola's arrest. "The Christian Democrats are mopping up on this. It's seriously undercutting D'Aubuisson right now," said one.