A new sensor for the determination of mercury at microg ml(-1) levels is proposed based on the adsorption of mercury vapor on single-walled carbon nanotubes (SWCNTs). The changes in the impedance of SWCNTs were monitored upon adsorption of mercury vapor. The adsorption behaviour of mercury on SWCNTs was compared with that on multi-walled carbon nanotubes (MWCNTs) and carbon nanofibers (CNFs). Cold vapor of mercury was generated at 65 degrees C using Sn(II) solution as a reducing agent. The limit of detection was 0.64 microg ml(-1) for Hg(II) species. The calibration curve for Hg(II) was linear from 1.0 to 30.0 microg ml(-1). The relative standard deviation (RSD) of eight replicate analyses of 15 microg ml(-1) of Hg(II) was 2.7%. The results showed no interfering effects from many foreign species and hydride forming elements. The system was successfully applied to the determination of the mercury content of different types of wastewater samples.