Direct population sequencing and reverse hybridization (line probe assay [LiPA])-based methods are the most common methods for detecting hepatitis B virus (HBV) drug resistance mutations, although only mutations present in viral quasispecies with a prevalence of > or =20% can be detected by sequencing, and only known mutations are detected by LiPA. Massively parallel ultradeep pyrosequencing (UDPS; GS FLX platform) was used to analyze HBV quasispecies in reverse transcriptase (RT) and hepatitis B S antigen (HBsAg) from five drug-naive patients and eight drug-resistant patients. Eight primer pairs were used to obtain partially overlapping amplicons, covering the RT gene from codons 1 to 288 and the complete overlapping HBsAg sequence. A 1% mutation frequency was selected as the cutoff based on an error rate estimated on plasmid DNA. This technology enabled simultaneous analysis of between 2,852 and 18,016 clonally amplified fragments from each patient. The results indicate that UDPS has a relative sensitivity much higher than both direct sequencing and LiPA. In addition, the UDPS results are quantitative, allowing establishment of the relative frequency of both known mutations and novel substitutions. Some of the detected RT substitutions led to changes also in HBsAg. On the whole, genotype D presented a higher heterogeneity than genotype A. Considering the high quantity of information that can be provided by a single test from one patient, the short turnaround time, the information on substitution frequency, and the detection of rare variants, there are strong advantages conferred by UDPS, and the new method could play a relevant role in the clinical management of HBV infection and therapy.