Alexandria Commonwealth's Attorney William L. Cowhig was handed an envelope stuffed with as much as $2,000 in $20 bills outside a bingo hall last spring, a key prosecution witness testified yesterday at Cowhig's trial on gmabling charges.

The credibility of the witness, Allen Palmore, was immediately challenged by a defense attorney who got Palmore to admit he originally had lied to police about the alleged payment and then made up a second story to replace it.

"They [the police] wanted a story about an envelope and you gave it to them, isn't that right?" Defense attorney Blair Lee Howard sarcastically asked Palmore.

"Yes," he answered.

Palmore was once a manager at the bingo parlor at 4603 Duke St. where Cowhig allegdly helped organize and run illegal bingo games. Yseterday Palmore testified that police investigators last year had raised the subject of an envelope containing money with him.

Once investigators brought up the subject, Palmore testified he falsely told them the only envelope he knew about was one Cowhig gave to him, containing $200, to enable him to open the bingo hall that night.

Palmore also testified that he had told officials the "true" story last week, when he received a grant of immunity from prosecution on bribery charges in exchanger for his testimony.

According to Palmore, sometime last April or May he was instructed by his bingo boss, James R. Fike, to give Cowhig an envelope from the safe at the bingo hall.

"I went out to his car... a small green city car with an emblem on the side... and gave it to him... I don't recall if Cowhig said anything," Palmore testified.

The envelope was unsealed, and contained $20 bills that totaled between $1,000 and $2,000, Palmor said, adding that he did not count the money.

Cowhig "slid the envelope inside a... small black notebook... on the front seat of the car" and then left the parking lot of the Shirley-Duke Shopping Center, Palmore testified.

Palmore's testmony was the most startling development during the second day of the prosecutor's trial. Several other proscution witnesses testified that Cowhig had been directly involved with organizing and running the Duke Street bingo games.

Special prosecutor Edward J. White rested his case in Alexandria Circuit Court yesterday after calling more than a dozen witnesses.

Cowhig, 53, stepped aside from his $42,500-a-year job as Alexandria's chief prosecutor after his indictment on various bingo related charges Aug. 3. In the current case he is charged helping organize, run and personally profiting form illegal bingo games run by the B & J Specialties Co. from March 1 to Sept. 1, 1977.

Last month Cowhig was acquitted of charges that he asked for and received $32,000 in bribes from the operator of bingo games run by the Montessori School of Alexandria Inc. Cowhig faces trial on another illegal gamebling charge March 5.

In the bribery trial, his defense attorneys successfully attacked the credibility of the chief witness against him. Dirgham Salahi. Yesterday defense attorney Howard attacked Palmore's motivation in testifying against Cowhig, telling the jury panel of nine women and five men that Palmore had testified because he was afraid of being charged himself.

Yesterday prosecutor White attempted to tie together a string of witnesses who linked Cowhig directly to the operations of te bingo games, which Palmore said sometimes netted as much as $3,000 a week.

Robert B. Hinkle, a former manager of the Duke Street bingo parlor, testified that at a meeting at Cowhig's home, Cowhig had told him, "I was going to be the manager of the bingo" games. However, Hinkle, who also has received immunity for his testimony, acknowledged that he could not recall the words Cowhigh had used, or the date of the meeting.

Hinkle said he had attended a second meeting with Cowhig; Fike, the president of B & J Specialties, and his father, Edward L. Hinkle, at which the bingo games were discussed but he said he could not recall anything Cowhig had said at that meeting.

Hinkle conceded that he had not paid federal income taxes on the $50 to $100 in cash he paid himself from bingo money each night. He said he had an agreement with federal officials that he would not be prosecuted for tax evasion if he filed an amended tax return listing the payments.

Henry Boggess Jr., a former bingo hall worker, testified that Cowhig had sometimes "pointed out to me people who... needed to buy" a bingo card. However, Boggess later told Howard that he could "very much" be mistaken about his testimony.

Two teen-age boys took the stand on Cowhig's behalf to testify that Cowhig had coached their baseball team and had attended all practices and games, an apparent attempt by the defense to account for his time when prosecution witnesses have stated Cowhig was at the bingo hall.