Measurements of charged pion and kaon production in central Pb+Pb collisions at 40, 80 and 158 AGeV are presented. These are compared with data at lower and higher energies as well as with results from p+p interactions. The mean pion multiplicity per wounded nucleon increases approximately linearly with s_NN^1/4 with a change of slope starting in the region 15-40 AGeV. The change from pion suppression with respect to p+p interactions, as observed at low collision energies, to pion enhancement at high energies occurs at about 40 AGeV. A non-monotonic energy dependence of the ratio of K^+ to pi^+ yields is observed, with a maximum close to 40 AGeV and an indication of a nearly constant value at higher energies.The measured dependences may be related to an increase of the entropy production and a decrease of the strangeness to entropy ratio in central Pb+Pb collisions in the low SPS energy range, which is consistent with the hypothesis that a transient state of deconfined matter is created above these energies. Other interpretations of the data are also discussed.