summary:We exploit the properties of Legendre polynomials defined by the contour integral $\bold P_n(z)=(2\pi {\rm i})^{-1} \oint (1-2tz+t^2)^{-1/2}t^{-n-1} {\rm d} t,$ where the contour encloses the origin and is traversed in the counterclockwise direction, to obtain congruences of certain sums of central binomial coefficients. More explicitly, by comparing various expressions of the values of Legendre polynomials, it can be proved that for any positive integer $r$, a prime $p \geqslant 5$ and $n=rp^2-1$, we have $\sum _{k=0}^{\lfloor n/2\rfloor }{2k \choose k}\equiv 0, 1\text { or }-1 \pmod {p^2}$, depending on the value of $r \pmod 6$