
517 F.3d 175 (2008)
UNITED STATES of America
v.
Maurice CUNNINGHAM, Appellant.
No. 06-3899.
United States Court of Appeals, Third Circuit.
Argued January 10, 2008.
Filed: February 21, 2008.
*176 Robert Epstein (Argued), Defender Association of Philadelphia, Federal Court Division, Philadelphia, PA, for Appellant.
Maria M. Carrillo (Argued), Office of United States Attorney, Philadelphia, PA, for Appellee.
Before: FISHER, HARDIMAN and STAPLETON, Circuit Judges.

OPINION OF THE COURT
FISHER, Circuit Judge.
Maurice Cunningham was convicted of (1) distribution of crack cocaine, (2) possession with intent to distribute more than five grams of cocaine base and aiding and abetting, and (3) possession of a firearm in furtherance of a drug trafficking crime and aiding and abetting. He appeals his possession convictions. For the reasons that follow, we will affirm the District Court's judgment as to the drug possession conviction and reverse the judgment as to the firearm possession conviction.

I.
On December 2, 2004, Officer Henry of the Philadelphia Police Department Narcotic Field Unit participated in an investigation in the 2600 block of North 30th Street. As the investigation unfolded, the target location became Rakiem Carter's residence at 2614 North 30th Street. From an unmarked police vehicle, Officer Henry observed Cunningham, who was on the sidewalk in front of Carter's house, participate in three transactions that appeared to be drug sales. Individuals approached Cunningham and gave him money, and he gave them small items from a plastic baggie.
During this time period, Carter exited the residence, spoke with Cunningham, walked away northbound, and then returned carrying a green book bag. Carter again spoke with Cunningham, then walked up the steps and into the house carrying the bag.
Another transaction took place between Cunningham and an individual in a silver BMW. After the BMW drove away, the driver was arrested. Pink-topped vials *177 containing crack cocaine were recovered from the driver's person and from the car.
Officer Henry decided to attempt a controlled buy through a confidential informant. While waiting for the informant to arrive, Officer Henry observed another transaction taking place in which Cunningham appeared to run out of drugs. Cunningham showed the buyer that his plastic baggie was empty and walked into a nearby empty lot. Cunningham exited the empty lot with another baggie in his hand. He gave the individual additional items from the new baggie, and the individual left.
Shortly afterward, police observed Cunningham on Carter's porch with two other men. The three went into the house. The confidential informant arrived, went up the steps, and knocked on the door. Almost immediately, the informant jumped off the porch and headed quickly up the street, pursued by Cunningham, Carter, and one or two other men who had all come out of the house. Carter yelled at the informant, "Don't you ever knock on my fucking door. You ain't the fuck from around here, you know that." Cunningham, Carter, and the others went back into the house. A few minutes later, a man came out of the house and walked away while looking up and down the street and talking on a mobile telephone. Immediately after this individual ended his call, Cunningham and Carter came out of Carter's house. Carter was carrying the green book bag and holding a key. After Cunningham and Carter walked around the corner, the police lost sight of them. A few moments later, the police saw Cunningham and Carter standing beside a Nissan Maxima with its trunk open. Carter leaned into the trunk, then leaned away and closed the trunk. Cunningham stood on the pavement at the rear of the car.
Cunningham and Carter were arrested as they walked away from the car. The police obtained a search warrant for the Maxima and found the green book bag in its trunk. Inside the book bag were a handgun, powder cocaine, a bowl with cocaine residue, scales, bulk marijuana, jars for bottling marijuana, and 153 pink-topped vials of crack cocaine (identical to the vials recovered from the silver BMW). The total net weight of the crack cocaine was 5.761 grams.
Cunningham and Carter were indicted and tried together before a jury. The jury convicted Cunningham of (1) distribution of crack cocaine (21 U.S.C. § 841), (2) possession with intent to distribute more than five grams of crack cocaine and aiding and abetting (21 U.S.C. § 841), and (3) possession of a firearm in furtherance of a drug trafficking crime, and aiding and abetting (18 U.S.C. § 924). The jury found Cunningham not guilty of conspiracy to possess with intent to distribute more than five grams of crack cocaine. Cunningham filed this timely appeal of his possession convictions.

II.
The District Court had subject matter jurisdiction under 18 U.S.C. § 3231. We have appellate jurisdiction under 28 U.S.C. § 1291.
When reviewing a jury verdict for sufficiency of the evidence, we "view[ the evidence in the light most favorable to the government [and] . sustain the verdict if any rational trier of fact could have found the essential elements of the crime beyond. a reasonable doubt." United States v. Greenidge, 495 F.3d 85, 100 (3d Cir.2007) (internal quotation marks and citation omitted).


*178 III.
The evidence presented at trial did not show that Cunningham held or carried the green book bag that contained the drugs and the gun. Therefore, in order to convict, a jury would have had to believe that he constructively possessed the items or that he aided and abetted Carter's possession of them.
We have defined constructive possession as follows:
Constructive possession exists if an individual knowingly has both the power and the intention at a given time to exercise dominion or control over a thing, either directly or through another person or persons. Constructive possession necessarily requires both dominion and control over an object and knowledge of that object's existence.
United States v. Iafelice, 978 F.2d 92, 96 (3d Cir.1992) (internal quotation marks and citations omitted). Aiding and abetting liability also includes a knowledge requirement, but is an otherwise distinct concept:
[T]o establish liability based upon an aiding and abetting theory, the government must prove (1) that the substantive crime has been committed, and (2) the defendant knew of the crime and attempted to facilitate it.... Thus, liability for aiding and abetting someone else in the commission of a crime requires the specific intent of facilitating the crime, and mere knowledge of the underlying offense is not sufficient for conviction.
United States v. Garth, 188 F.3d 99, 113 (3d Cir.1999) (internal quotation marks and citations omitted).
This case is somewhat unusual, because as we will explain, we conclude that Cunningham's gun possession conviction requires a different legal analysis than his drug possession conviction. Our analysis of the gun possession conviction is controlled by Garth, which leads us to conclude that the evidence was insufficient for the jury to find that Cunningham possessed the gun. 188 F.3d at 113-14. However, our analysis of the drug possession conviction is controlled by Iafelice, which leads us to conclude that the evidence was sufficient for the jury to find that Cunningham possessed the drugs. 978 F.2d at 97.
In Garth, we concluded that the evidence did not show that the defendant possessed a gun under 18 U.S.C. § 924. 188 F.3d at 114. Garth was arrested at 30th Street Station in Philadelphia. Id. at 103. A bag that his companions carried into the train station was discovered to contain crack cocaine and a handgun. Id. Garth admitted that he and his companions were transporting the cocaine to sell in West Virginia. Id. However, Garth had not learned that his friend, had a gun until they were entering the station. Id. at 110. Garth "never handled either the gun or the bag containing the gun." Id.
Garth filed a habeas corpus petition. He did not challenge his drug possession conviction, but he attacked his § 924 weapon possession conviction. We concluded that Garth did not constructively possess the gun, stating: "[A]lthough Garth accompanied Wilson while the latter exercised dominion and control over the gun, that association alone does not magically transform Garth's proximity to Wilson into culpability for all of Wilson's actions, or establish any vicarious responsibility for the gun." Id. at 112. Garth did not know of the gun until he and his companions had entered the train station, and because the record did not show that Garth intended "to use or carry a weapon in connection with the possession or distribution of the drugs in the bag," the evidence was insufficient *179 to show Garth's constructive possession of the gun. Id. at 113.
In addition, Garth did not aid and abet his companions' possession of the gun, because the record did not show that he "attempted to facilitate the carrying of the gun, that he wished to bring about or make that offense succeed, or that the gun was in any way instrumental to his decision to participate in the drug offense." Id. at 114. We distinguished Garth's actions from those of the codefendants in United States v. Price, 76 F.3d 526 (3d Cir.1996), where the defendant was guilty of aiding and, abetting possession of a gun during a bank robbery because "a reasonable jury could infer that Price had prior knowledge that [his codefendant] was planning to use and carry the gun . ., and that both [men's] roles in the crime were facilitated by the fact that [the codefendant] brandished a gun while Price scooped up the money." Garth, 188 F.3d at 113. Unlike the Price case, Garth's actions were not so intertwined with those of his companions that he aided and abetted their possession of the gun.
Like the Garth case, Cunningham did not constructively possess the gun or aid and abet its possession. The evidence did not demonstrate that Cunningham knew about the gun, and his actions did not show that he "attempted to facilitate the carrying of the gun ... or that the gun was in any way instrumental to his decision to participate in the drug offense." Id. at 114. We have stated that although guns and drugs are often linked, the presence of one does not prove knowledge of the other. United States v. Cartwright, 359 F.3d 281, 290 n. 5 (3d Cir.2004). The evidence in this casethat Cunningham walked down the street with Carter, who was carrying the gun in a backpackwas insufficient to allow the jury to convict under 18 U.S.C. § 924.
On the other hand, there was a clear link between Cunningham and the crack cocaine in the backpack. The crack was packaged in pink-topped vials that were identical to the ones recovered from Cunningham's customer in the silver BMW. This evidence allowed the jury to infer that Cunningham's drugs and the drugs in the backpack came from a common source, and that Cunningham knew about the drugs in the backpack.
In Iafelice, we concluded that the evidence was sufficient to support the defendant's conviction for constructive possession of drugs. 978 F.2d at 93. Iafelice drove his car to a hotel where a drug sale had been arranged. Id. at 97. He remained in his car while his companion took the drugs inside. Id. As the transaction was taking place, there was telephone contact between Iafelice and his companion who was inside the hotel closing the sale. Id. We concluded that there was "a logical and convincing connection between the facts established and the conclusion inferred." Id. Although the government did not present direct evidence that Iafelice knew the bag contained drugs, the sequence of events allowed the jury to infer that he knew the drugs were there and to find that he constructively possessed them. Id.
In this case, the events that took place on North 30th Street allowed the jury to reasonably conclude that Cunningham knew of the drugs in the backpack, and that he either constructively possessed them or aided and abetted their possession. Cunningham sold identically-packaged drugs that morning, spoke with Carter repeatedly, went inside Carter's house, and helped Carter chase away a confidential informant who posed a potential threat to the drug dealing operation. After chasing away the informant, Cunningham accompanied Carter while he took the green *180 backpack from his house to a car parked around the corner, and a reasonable jury could conclude that the two men were acting together to safeguard the contraband in the backpack.
Cunningham argues that because he replenished his drug supply from the vacant lot, rather than from the green backpack, there was insufficient evidence to allow the jury to find that he knew of the crack cocaine in the backpack. However, we conclude that as in Iafelice, there is a "logical and convincing connection between the facts established and the conclusion inferred," id., which is that Cunningham knew of the crack and constructively possessed it or aided and abetted Carter's possession of it.

IV.
For these reasons, we will affirm the District Court's judgment as to the drug possession and reverse the judgment as to the weapon possession. We will remand for resentencing consistent with this opinion.
