  We present a calculation of $\pi^0$ photoproduction on the proton in
manifestly Lorentz-invariant baryon chiral perturbation theory up to and
including chiral order $q^4$. With the results we analyze the latest $\pi^0$
photoproduction data in the threshold region obtained at the Mainz Microtron.
In the calculation of observables and the fit of the low-energy constants, we
take $S$, $P$, and $D$ waves into account. We compare the results for the
multipoles with the corresponding single-energy analysis. Furthermore, we also
fit the $O(q^4)$ heavy-baryon chiral perturbation theory calculation and
compare both results. We provide predictions for several polarization
observables for future experiments. Finally, we discuss the $\beta$ parameter
of the unitarity cusp which is related to the breaking of isospin symmetry.
