We present computer simulations of long thin hard spherocylinders in a narrow planar slit. We observe a transition from the isotropic to a nematic phase with quasi-long-range orientational order upon increasing the density. This phase transition is intrinsically two dimensional and of the Kosterlitz-Thouless type. The effective two-dimensional density at which this transition occurs increases with plate separation. We qualitatively compare some of our results with experiments where microtubules are confined in a thin slit, which gave the original inspiration for this work.