$p\in E$. If $\pi_1(E, p) \hookrightarrow \pi_1(M, p)$ is surjective, then any parallel complex structure $J_E$ on $E$ may be extended uniquely to a parallel complex structure $J$ on $M$.

Let $\hat{J} = J_E(p)$. The uniqueness of any extension $J$ of $J_{E}$ to $M$ is clear, since, given $q\in M$ we must have $$\label{eq:jext}
J(q) = P_{\gamma}\hat{J}P_{\gamma}^{-1}$$ where $P_\gamma:T_pM \to T_qM$ is parallel translation along any piecewise smooth path $\gamma$ from $p$ to $q$. On the other hand, we can also use to define $J(q):T_qM\to T_qM$. This will yield a smooth parallel complex structure on all of $M$ provided the extension can be shown to be independent of the path $\gamma$.

Suppose $\sigma$ is any other path from $p$ to $q$. Under our assumption on $\pi_1(E)$, the loop $\gamma \cdot \bar{\sigma}$, where $\bar{\sigma}$ denotes the reverse parametrization of $\sigma$ from $q$ to $p$ along $\sigma$, is homotopic to some loop $\alpha$ contained entirely in $E$. Then $$P_{\gamma} = P_{\sigma} P_{\bar{\sigma}} P_{\gamma} P_{\bar{\alpha}} P_{\alpha} 
 = P_{\sigma} P_{\beta}P_{\alpha}$$ where $\beta = \bar{\alpha}\cdot \gamma\cdot \bar{\sigma}$ is a null-homotopic loop based at $p$.

Since $(M, g)$ is real-analytic, the local holonomy of $g$ at $p$ coincides with the reduced holonomy (see, e.g., [@Nomizu]), so 