  Let $f$ be a holomorphic endomorphism of $\mathbb{P}^2$, let $T$ be its Green
current and $\mu=T\wedge T$ be its equilibrium measure. We prove that if $\mu$
has a local product structure with respect to $T$ then (an iterate of) $f$
preserves a local foliation $\mathcal{F}$ on a neighborhood of $\mathrm{Supp}(T
)\backslash\mathcal{E}$,where $\mathcal{E}$ denotes the exceptional set of f .
If the local foliation $\mathcal{F}$ extends through $\mathcal{E}$,then it
extends to $\mathbb{P}^2$ and is an invariant pencil of lines.
