A method is disclosed for detecting the presence of a target nucleotide sequence in a polynucleotide. The method comprises hybridizing a first nucleotide sequence and a second nucleotide sequence to non-contiguous portions of a target nucleotide sequence, covalently attaching the first and second sequences when they are hybridized to the target sequence, and determining the presence of covalently attached first and second sequences. The presence of the covalently attached first and second sequences is related to the presence of the target nucleotide sequence. The invention may be applied to target nucleotide sequences in DNA or RNA. Specific target nucleotide sequences of interest will frequently be characteristic of particular microorganisms, viruses, viroids, or genetic characteristics, including genetic abnormalities.