Purpose: Irreversible electroporation (IRE) uses short duration, high-voltage electrical pulses to induce cell death via nanoscale defects resulting from altered transmembrane potential. The technique is gaining interest for ablations in unresectable pancreatic and hepatobiliary cancer. Metal stents are often used for palliative biliary drainage in these patients, but are currently seen as an absolute contraindication for IRE due to the perceived risk of direct heating of the metal and its surroundings. This study investigates the thermal and tissue viability changes due to a metal stent during IRE. Methods: IRE was performed in a homogeneous tissue model (polyacrylamide gel), without and with a metal stent placed perpendicular and parallel to the electrodes, delivering 90 and 270 pulses (15-35 A, 90 μsec, 1.5 cm active tip exposure, 1.5 cm interelectrode distance, 1000-1500 V/cm, 90 pulses/min), and in-vivo in a porcine liver (4 ablations). Temperature changes were measured with an infrared thermal camera and with fiber-optic probes. Tissue viability after in-vivo IRE was investigated macroscopically using 5-triphenyltetrazolium chloride (TTC) vitality staining. Results: In the gel, direct stent-heating was not observed. Contrarily, the presence of a stent between the electrodes caused a higher increase in median temperature near the electrodes (23.2 vs 13.3°C [90 pulses]; p = 0.021, and 33.1 vs 24.8°C [270 pulses]; p = 0.242). In-vivo, no temperature difference was observed for ablations with and without a stent. Tissue examination showed white coagulation 1mm around the electrodes only. A rim of vital tissue remained around the stent, whereas ablation without stent resulted in complete tissue avitality. Conclusion: IRE in the vicinity of a metal stent does not cause notable direct heating of the metal, but results in higher temperatures around the electrodes and remnant viable tissue. Future studies should determine for which clinical indications IRE in the presence of metal stents is safe and effective.