WASHINGTON (AP) _ A CIA official contradicted a key government witness Friday and testified that he knew nothing of the diversion of funds in the Iran-Contra affair until late November of 1986, according to a source familiar with the testimony.

CIA official Jerry Gruner told a federal grand jury investigating the Iran- Contra scandal he did not learn about the diversion until shortly before it was publicly exposed, according to the source who spoke on condition of anonymity.

The testimony from Gruner, who has held CIA posts in Central America and Europe, could raise questions about the account of the case given to prosecutors by retired CIA officer Alan Fiers.

Fiers pleaded guilty in July to two misdemeanor counts of withholding information from Congress and became a government witness. He said he told Gruner of the diversion in late summer 1986.

Gruner spent 90 minutes before the grand jury answering questions from Iran-Contra prosecutors.

Gruner's lawyer, William Hundley, said only that ''there were some differences of recollection with Mr. Fiers as to some events that happened five years ago.''

Stanley Arkin, Fiers' lawyer, declined to comment or even to acknowledge that there is a contradiction between the stories that Fiers and Gruner gave to prosecutors.

Cooperation from Fiers had been seen as rejuvenating independent counsel Lawrence Walsh's 4 1/2 year criminal investigation of the Iran-Contra affair.

Walsh has said he is investigating a coverup by the CIA of the agency's knowledge of the diversion.

Former National Security Council official Oliver North oversaw the secret diversion of money from the Iran arms sales to the Contra rebels in late 1985 and 1986. North was fired when the diversion was revealed on Nov. 25, 1986. North's boss, national security adviser John Poindexter, resigned.

The ensuing criminal investigation by Walsh's office led to the convictions of North and Poindexter. North's convictions have been set aside. Poindexter is appealing his.

North had been convicted of aiding and abetting an obstruction of Congress, destroying documents and accepting an illegal gratuity. Poindexter was convicted of conspiracy, two counts of obstructing Congress and two counts of making false statements.

But none of the convictions have dealt with the diversion.