  We report measurements of the lifetimes of the 3d $^2$D$_{5/2}$ and 3d
$^2$D$_{3/2}$ metastable states of a single laser-cooled $^{40}$Ca$^+$ ion in a
linear Paul trap. We introduce a new measurement technique based on
high-efficiency quantum state detection after coherent excitation to the
D$_{5/2}$ state or incoherent shelving in the D$_{3/2}$ state, and subsequent
free, unperturbed spontaneous decay. The result for the natural lifetime of the
D$_{5/2}$ state of 1168(9) ms agrees excellently with the most precise
published value. The lifetime of the D$_{3/2}$ state is measured with a single
ion for the first time and yields 1176(11) ms which improves the statistical
uncertainty of previous results by a factor of four. We compare these
experimental lifetimes to high-precision ab initio all order calculations and
find a very good agreement. These calculations represent an excellent test of
high-precision atomic theory and will serve as a benchmark for the study of
parity nonconservation in Ba$^+$ which has similar atomic structure.
