The applicability of poly(acrylamide) grafted onto cross-linked poly(4-vinyl pyridine) (P4-VP-g-PAm) has been investigated for the separation, preconcentration and speciation of Hg(II) and MeHg(I). In batch experiments, Hg(II) was quantitatively retained (>= 95%) in the pH range of 1.0 - 8.0, whereas the sorption of MeHg(I) was insignificant in the pH ranee of 1.0 - 2.0. Freundlich and Langmuir isotherm models were investigated in order to characterize the sorption, and the capacity of the sorbent was found to be 817 mg Hg(II) g(-1). The limit of detection (3 delta above blank) was 2 ng L(-1). The sorbent has excellent selectivity for Hg(II) in the presence of Pb(II), Zn(II), Cu(II), Cd(II) and Fe(III) ions. The method was successfully applied to the determination of Hg(II) and MeHg(I) in seawater and estuarine water. The sorbent can remove Hg(II) at pH 2.0, and therefore makes the determination of MeHg(I) possible, even if the sample contains a high amount of Hg(II).