
444 A.2d 962 (1982)
Kenneth C. SIMMONS, Appellant,
v.
UNITED STATES, Appellee.
No. 80-614.
District of Columbia Court of Appeals.
Submitted January 7, 1982.
Decided April 15, 1982.
*963 Donald J. Schutz, Washington, D. C., for appellant.
John A. Terry, Asst. U. S. Atty., Washington, D. C., with whom Charles F. C. Ruff, U. S. Atty., Washington, D. C., at the time the briefs were submitted, was on the brief, for appellee.
Before NEWMAN, Chief Judge, and FERREN and PRYOR, Associate Judges.
NEWMAN, Chief Judge:
Appellant seeks reversal of his convictions for carrying a pistol without a license in violation of D.C.Code 1981, § 22-3204, and possession of an unregistered firearm in violation of D.C.Code 1981, § 6-2311. He asserts that the trial court erred by giving a missing witness instruction to the jury despite the fact that the evidentiary predicate required before such an instruction may be given was absent and that this error was not harmless. We agree and reverse.

I.
The government's evidence established that while on patrol, two police officers approached a parked car in order to check on the two persons inside. As the officers approached, one person got out of the car from the driver's side while the other, appellant Simmons, waited on the passenger side of the front seat. The officers asked the person who had gotten out of the car, Jewell Thurston, for her driver's license and the car's registration. After Thurston indicated that she neither owned nor was driving the car, one officer glanced down at the car's front seat and noticed the butt of a gun protruding from a leather glove under the armrest in the front seat. Thereafter, the police arrested appellant and Thurston.
Appellant and Thurston were tried together. Appellant testified that he had no knowledge until arrested that there was a gun in the car. Thurston also indicated that she had no knowledge of the gun's existence prior to her arrest. Appellant testified that he had gotten into the car in order to get a ride to a friend's house. An acquaintance of his, Benjamin Bell, was driving the car. Along the way, Bell picked up both Sherman Marshall and Thurston. Both Thurston and the appellant testified that the car had stalled and had to be jump started. Appellant testified that Bell and Marshall had left the car together shortly before the police arrived and that Thurston had moved from the back seat to the front seat in order to stay warm. Thurston's testimony corroborated appellant's in this regard. She indicated that Bell and Marshall left the car together to buy some jumper cables in case the car experienced further difficulties.
At a bench conference at the close of the defense case, the court, inter alia, suggested to the government that a missing witness instruction might be appropriate. Appellant's counsel objected to the judge's suggestion and argued to no avail that the instruction was inappropriate.[1]

II.
The rule is well established that if a party has it peculiarly within his power to produce witnesses whose testimony would elucidate the transaction, the fact that he does not do it may create the presumption that the testimony, if produced, would be unfavorable. Graves v. United States, 150 U.S. 118, 121, 14 S.Ct. 40, 41, 37 L.Ed. 1021 (1893); Coombs v. United States, D.C.App., 399 A.2d 1313, 1316 (1979). Yet, this court *964 has consistently recognized that dangers inherent in allowing the jury to draw an adverse inference from the absence of evidence,[2] require the trial court to make an advance factual determination (1) that the witness is peculiarly within the power of the party to produce, and (2) that the witness' testimony is likely to elucidate the transaction in issue. See Dent v. United States, D.C.App., 404 A.2d 165, 169-70 (1979); Cooper v. United States, D.C.App., 415 A.2d 528, 533 (1980). See also Burgess v. United States, 142 U.S.App.D.C. 198, 206, 440 F.2d 226, 234 (1970). If either condition is not present, the missing witness instruction is inappropriate and prohibited. Dyson v. United States, D.C.App., 418 A.2d 127, 131 (1980); Conyers v. United States, D.C. App., 309 A.2d 309, 312-13 (1973). And even if the trial court makes the necessary factual determination that both conditions are met, it still has considerable latitude to refuse to give a missing witness instruction, where it determines from all of the circumstances that the inference of unfavorable testimony is not a natural or reasonable one. "[N]ot every absent but producible witness who can be held to have some knowledge of the facts need by reason of Graves be made the subject of the `presumption.'" Cooper v. United States, supra at 533 (quoting Burgess v. United States, supra at 206, 440 F.2d at 235). This exercise of discretion must itself be based on a firm factual foundation and be exercised in an informed and rational manner if it is to withstand appellate scrutiny. See generally Johnson v. United States, D.C. App., 398 A.2d 354, 364-66 (1979) (trial court's exercise of discretion).
The trial judge's factual determination cannot be made in a vacuum. The trial judge is required to make an "informed decision" on both the absent witness' availability and the likelihood that the absent witness will be able to elucidate the transaction. See Harris v. United States, D.C. App., 430 A.2d 536, 543 (1981); Stewart v. United States, 135 U.S.App.D.C. 274, 278, 418 F.2d 1110, 1114 (1969). Before the jury is allowed to draw an adverse inference from the witness' unavailability, the opposing partyin this case the government must establish the two foundation conditions to the court's satisfaction. Where, for instance, the government has failed to make an affirmative showing that the absent witness' testimony would have elucidated the transaction, this court has held it error for the court to give such an instruction. Cooper v. United States, supra at 534.
The trial judge, in this case, failed to conduct a factual inquiry and thus failed to make an informed factual determination that either required precondition was met. The government failed to submit any evidence which could have established that the absent witnesses were peculiarly within the power of the defendant to produce or that their testimony would be non-cumulative and superior to other testimony already given on the matter. Likewise, the defendant was deprived of an opportunity to contest the existence of either factual precondition.[3]
Indeed, the trial judge failed even to indicate on the record to what person or persons the missing witness instruction referred. The court merely observed that the appellant and his co-defendant had testified that other persons who were not witnesses had been present in the car prior to the arrival of the police. Whether the instruction was intended to apply to the car's driver or another passenger or both is unclear. Absent articulated consideration by the trial judge, based on evidence submitted by the parties, that the two preconditions for the missing witness instruction had been *965 met as to a particular witness, it was error to give the instruction. There being no factual foundation, there was, perforce, no valid exercise of discretion as required by Cooper v. United States, supra.

III.
Having concluded that it was error for the trial court to give the missing witness instruction, we must determine whether it was harmless error under Kotteakos v. United States, 328 U.S. 750, 765, 66 S.Ct. 1239, 1248, 90 L.Ed. 1557 (1946).[4] We have previously held that where the missing witness instruction was erroneously given or the doctrine erroneously argued by the prosecution, and the credibility of the defendant was crucial to his case, the error was prejudicial and mandated reversal. Coombs v. United States, supra at 1318; Haynes v. United States, D.C.App., 318 A.2d 901, 903 (1974). See also Brown v. United States, 134 U.S.App.D.C. 269, 272, 414 F.2d 1165, 1168 (1969).
This case turns largely on the defendant's credibility. The crucial issue was whether he was in possession of the gun found in the car. The evidence against him on this point was not particularly strong, resting solely on the evidence that he was sitting in close proximity to the place the police officer testified that the gun was found. Simmons' testimony was that while the gun was found close to his seat he had never known it was there. His own testimony was the primary evidence arguing in favor of his innocence. The matter for jury consideration consisted of deciding whether to believe Simmons or to infer from his proximity to the place where the gun was found that he must have known of its presence. Since the erroneously given instruction likely may have damaged appellant's credibility with the jury on this issue, we cannot conclude that the error was harmless. The judgment must therefore be reversed.
So Ordered.
NOTES
[1]  Appellant also challenges the trial court's denial of a defense motion for a mid-trial continuance for the purpose of securing additional testimony. We do not reach this issue.
[2]  In Dent v. United States, D.C.App., 404 A.2d 165, 170-71 (1979), we agreed with the United States Court of Appeals for the District of Columbia Circuit that the adverse inference is dangerous insofar as it may add fictitious weight to one side of the case by giving the missing witness undeserved significance.
[3]  It is not surprising that no factual foundation had been laid by either litigant since neither sought a missing witness instruction. Rather, it was sua sponte suggested by the court at the close of the evidence. This case makes apparent the danger of such a practice.
[4]  The Kotteakos formulation for determining harmless error is as follows:

But if one cannot say, with fair assurance, after pondering all that happened without stripping the erroneous action from the whole, that the judgment was not substantially swayed by the error, it is impossible to conclude that substantial rights were not affected. The inquiry cannot be merely whether there was enough to support the result, apart from the phase affected by the error. It is rather, even so, whether the error itself had substantial influence. If so, or if one is left in grave doubt, the conviction cannot stand. [Conyers v. United States, D.C.App., 309 A.2d 309, 313-14 (1973) (quoting Kotteakos v. United States, supra at 765, 66 S.Ct. at 1248).]
