Boron nitride nanotubes, like carbon nanotubes, possess extraordinary mechanical properties. Herein, a three-dimensional finite element model is proposed in which the nanotubes are modeled using the principles of structural mechanics. To obtain the properties of this model, a linkage between the molecular mechanics and the density functional theory is constructed. The model is utilized to study the buckling behavior of single-walled boron nitride nanotubes with different geometries and boundary conditions. It is shown that at the same radius, longer nanotubes are less stable. However, for sufficiently long nanotubes the effect of side length decreases.