Photodynamics and excited-state intramolecular proton transfer (ESIPT) of N-(3,5-ditert-butylsalicylidene)-4-aminopyridine (4P) and N-(3,5-ditert-butylsalicylidene)-2-aminopyridine (2P) are studied by steady-state and transient optical spectroscopy in solution and solid state (microcrystalline powder). These two compounds are representative of anils Classes A and B, respectively. The results confirm that in solution both compounds have a similar dynamic behavior: upon excitation at 390 nm, ESIPT leads to different cis-keto* fluorescent species which relax to the photochromic trans-keto photoproduct within a few tens of picoseconds. Furthermore, for the first time, picosecond data are recorded for the two classes of anils in the solid state: in 2P, two cis-keto* fluorescent excited state species (23 and 250 ps lifetime) are relaxing exclusively to the cis-keto ground state, whereas in 4P, a single cis-keto* fluorescent species is observed which leads to the trans-keto photoproduct in 250 ps via an intermediate metastable species. † Part of the "Hiroshi Masuhara Festschrift".