This article describes a method for determining whether a particular nucleic acid sequence is present in a sample and for discriminating between any two nucleic acid sequences if such sequences differ only by a single nucleotide. The method entails extension of a novel two-component primer on templates that may or may not include a target nucleic acid sequence. The 3' portion of the primer is complementary to a portion of the template adjacent to the target sequence (for example, the polymorphic nucleotide). The 5' portion of the primer is complementary to a different preselected nucleic acid sequence. Extension of the 3' portion of the primer with a labeled deoxynucleoside triphosphate yields a labeled extension product, but only if the template includes the target sequence. The presence of such a labeled primer-extension product is detected by hybridization of the 5' portion to the preselected sequence. The preselected sequence is immobilized on a solid support. The method has been applied to genotyping individuals for the two-allele polymorphism of the human tyrosinase gene.