Special Alexandria prosecutor Edward J. White said yesterday he accepted the resignation of the city's prosecutor, William L. Cowhig, because "the risk of losing the third (Cowhig) trial was unacceptable... to the city."

Cowhig's resignation from the $42,500-a-year elected position was given White yesterday in return for his promise to drop the remaining charge against Cowhig that grew out of an extensive investigation into Northern Virginia's bingo industry.

"Justice is better served by making the change in office," White said yesterday. Cowhig, the first common-wealth's attorney in Virginia to be indicted while in office, will resign effective Feb. 23 under an agreement reached Tuesday with his lawyers.

"He's paid the price," White said, calling the resignation "a successful conclusion" to a bitter investigation that has divided much of Alexandria's political and legal community into pro-and anti-Cowhig factions.

The resignation will allow Cowhig, 53, to recoup his contributions to the state's retirement system and keep his law license. It does not end his legal troubles.

Barely 24 hours before he formally accepted Cowhig's resignation delivered by White, Chief Alexandria Circuit Court Judge Wiley R. Wright had named another special prosecutor to investigate allegations that Cowhig had solicited a sexual favor from a defendant's wife.

Cowhig has denied that charge and had pleaded innocent to the charges that grew out of the bingo investigation. Two juries had acquitted him on the first two bingo-related charges and the third case, alleging that he engaged in gambling in the form of bingo, was scheduled to be tried March 5.

Had Cowhig been convicted on any of the charges -- all were felonies -- he would have been ousted from office and barred from seeking reelection. The plea bargain agreement does not block him from seeking the position in a subsequent election, but Cowhig has said he will not seek to regain the office in an election.

His resignation will force a special election, probably in November, to fill the remainder of Cowhig's term, which was to end in 1981. Cowhig's former top deputy, John E. Kloch, assumed the position in August when Cowhig announced he was stepping aside, pending the outcome of his three trials.

White, who said he accepted the special prosecutor's job unconvinced that he would find wrongdoing, said he was leaving his position troubled by what he had seen and convinced that the city would be better off by Cowhig's departure from City Hall.

"I feel he (Cowhig) has done some things that were quite wrong," White said in a wide-ranging two-hour interview in his Old Town law office. "But I never had any animosity toward Bill. I'm sorry he ever got involved. But there was no conspiracy, nobody was out to get him."

There were times that the Cowhig trials became "an emotional bloodbath," White said. He once suffered a near breakdown from tension and had to accept police bodyguards after a scuffling incident outside the courtroom where. Cowhig was being tried, he said. "It was an ugly crowd over there." White said, shaking his head in amazement.

"I'm not a very good loser," White said. "I've made some mistakes. God knows, nobody tried harder than me to get a conviction.My biggest mistake was underrating the situation of what it takes to convict someone. It might be a post-Watergate backlash, I don't know."

"But we've closed down the crooked bingo games, we've shut down the big operators," White said, leaning back in his chair, and lighting up a cigarette.

"We've convicted two [bingo operators] taken pleas on aiding and abetting from another two..." he said, referring to his less-celebrated bingo prosecutions.

White's final bingo trial begins today in Alexandria. James R. Fike, one of the first people indicted last summer after White assumed his duties, goes on trial on two charges of running illegal bingo games in the city.

One of his final duties, White said yesterday, was to analyze the city's lucrative Montessori School bingo games with city officials who are considering seeking a court injunction to close the games.

The school's director, Dirgham Salahi, was the key witness against Cowhig in the December bribery trial, a trial that raised strong emotions among lawyers in the city. "I still haven't gotten over it. I'm still tense," White said.

White said his cases against Cowhig were developed with the help of an unidentified informant whom White described as "a friend of Cowhig's.

"This person gave us some very crucial information with the understanding that he would not be called as a witness," said White.

White said that no formal court hearing would be necessary to dispose of the last Cowhig case. Prince William Circuit Court Judge Percy Thornton Jr. -- who was appointed to handle the Cowhig cases after three Alexandria Circuit Court judges disqualified thmeselves -- has agreed to the arrangement, White said.

Although White said he was satisfied with the outcome of his bingo investigations, he said he would seek more investigative help if he had to conduct the probe again.

"Virginia, by and large, will no stand for corruption," he said. "Had the situation gotten any worse, we'd have gone to the governor to straight en it out."