Single-walled aluminum nitride nanotubes (AlNNTs) are introduced as an electronic sensor for detection of sulfur dioxide (SO₂) molecules based on density functional theory calculations. The proposed sensor benefits from several advantages including high sensitivity: HOMO-LUMO energy gap of the AlNNT is appreciably sensitive toward the presence of SO₂ so that it decreases from 4.11 eV in the pristine tube to 1.01 eV in the SO₂-adsorbed form, pristine application: this nanotube can detect the SO₂ molecule in its pristine type without manipulating its structure through doping, chemical functionalization, making defect, etc., short recovery time: the adsorption energy of SO₂ molecule is not so large to hinder the recovery of AlNNTs and therefore the sensor will possess short recovery times, and good selectivity: the tube can selectively detect the SO₂ molecule in the presence of several molecules such as H₂O, CO, NH₃, HCOH, CO₂, N₂, and H₂.