Abstract: This article develops a threshold regression model, where the threshold is determined by an unknown relation between two variables. The threshold function is estimated fully nonparametrically. Since the observations are allowed to be cross-sectionally dependent, our model can be applied to determine an unknown spatial border for sample splitting over a random field. The uniform rate of convergence and the nonstandard limiting distribution of the nonparametric threshold estimator are derived. The root-n consistency and the asymptotic normality of the regression coefficients are also derived. Empirical relevance is illustrated by estimating an economic border induced by the housing price difference between Queens and Brooklyn in New York City, where the economic border deviates substantially from the administrative one.