# Complex manifold which is algebraic away from codimension \ge 2

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$?

-
Do you want $X$ to be compact? – Angelo Mar 22 '12 at 11:24
You can assume $X$ is compact; although I would still be curious if a statement can be made if $X$ is non compact with perhaps some "niceness" conditions on $Z$. – solbap Mar 22 '12 at 13:13
$X-Z$ algebraic forces enough meromorphic functions on $X$ for it to be a Moisezon space and so an algebraic space provided it is irreducible and compact. – Ray Hoobler Mar 22 '12 at 20:40
@Ray: if $f$ is meromorphic on $X-Z$, must it be meromorphic on $X$? – Laurent Moret-Bailly Mar 23 '12 at 9:42
Brian Conrad brought to my attention the reference "Coherent Analytic Sheaves" by Hans Grauert, Reinhold Remmert. On pg. 185 they prove a meromorphic function on an analytic Zariski open set with complement of codim \ge 2 extends to a global meromorphic function when the global space is normal. He also mentioned that there are smooth connected proper algebraic spaces which aren't schemes but they are schemes away from codimension 2 subsets. – solbap Mar 23 '12 at 21:08