It is intended to provide a method for detecting a target nucleic acid
with a specific base sequence existing in a sample mixture with high
specificity and sensitivity by utilizing the formation of a hybrid with a
complementary strand as a detection principle, and a nucleic acid for the
detection. The invention relates to a set of nucleic acids for detecting
a target nucleic acid with a specific base sequence comprising a
photoligating nucleic acid composed of a nucleic acid (with the proviso
that in the nucleic acid, a nucleic acid and a peptide nucleic acid are
included) having a group represented by the formula I, II, III, IV or V
described in claims at the 5' end or 3' end as a base moiety, and a
photoligated nucleic acid having a base with a carbon-carbon double bond
at the 3' end or 5' end as a base moiety capable of photoligating to the
photoligating nucleic acid, wherein either of the photoligating nucleic
acid and the photoligated nucleic acid has a labeling moiety and the
other remaining nucleic acid is immobilized on a substrate, and the
method for detecting a target nucleic acid with a specific base sequence
by using the set of nucleic acids.