In this paper, we present an analytical method for computing the globally optimal estimates of orthogonal vanishing points in a "Manhattan world" with a calibrated camera. We formulate this as constrained least-squares problem whose optimality conditions form a multivariate polynomial system. We solve this system analytically to compute all the critical points of the least-squares cost function, and hence the global minimum, i.e., the globally optimal estimate for the orthogonal vanishing points. The same optimal estimator is used in conjunction with RANSAC to generate orthogonal-vanishing- point hypotheses (from triplets of lines) and thus classify lines into parallel and mutually orthogonal groups. The proposed method is validated experimentally on the York Urban Database.