If $X$ is a complex manifold and $Z$ is a closed subset of codimension $\ge 2$ such that $X-Z$ has an algebraic structure, then is $X$ algebraic; i.e. a scheme? If not is $X$ an algebraic space?

To clarify: is there a global algebraic structure on $X$ that restricts to a given algebraic structure on a analytic Zariski $U$ with complement codimension $\ge 2$?

3more comments