Long-term potentiation (LTP) of synaptic strength can be induced by synchronous pre- and postsynaptic activation, and a rise in postsynaptic calcium is essential for induction of LTP. Calcium can enter through both voltage-dependent Ca2+ channels and NMDA-type glutamate receptors, but the relative contributions of these pathways is not known. We have examined this issue in layer V cortical pyramidal neurons, using focal flash photolysis of caged glutamate to mimic synaptic input and two-photon, laser-scanning microscopy to measure calcium levels in dendritic spines. Most of the calcium entry in response to glutamate alone was via voltage-dependent Ca2+ channels, and NMDA receptors accounted for less than 20% of total Ca2+ entry. When glutamate was paired with postsynaptic action potentials, however, the NMDA-receptor-dependent component was selectively amplified. The same is likely to occur during paired physiological pre- and postsynaptic activation, providing a mechanism for the input specificity and Hebbian behavior of LTP.