The reaction e+e−→e+e−π0π0 has been analyzed using 97 pb−1 of data taken with the Crystal Ball detector at the DESY e−e+ storage ring DORIS II at beam energies around 5.3 GeV. For the first time we have measured the cross section for γγ→π0π0 for π0π0 mvariant masses ranging from threshold to about 2 GeV. We measure an approximately flat cross section of about 10 nb for W=mπ0π0<0.8 GeV, which is below 0.6 GeV, in good agreement with a theoretical prediction based on an unitarized Born-term model. At higher invariant masses we observe formation of the f2(1270) resonance and a hint of the f0(975). We deduce the following two-photon widths: Γγγ(f2(1270))=3.19±0.16±0.280.29 keV and Γγγ(f0(975))<0.53 keV at 90% C.L. The decay-angular distributions show the π0π0 system to be dominantly spin 0 for W<0.7 GeV and spin 2, helicity 2 in the f2(1270) region, with helicity 0 contributing at most 22% (90% C.L.).