Phase behavior of quasi-one-dimensional water confined inside a carbon nanotube is studied in the thermodynamic space of temperature, pressure, and diameter of the cylindrical container. Four kinds of solid-like ordered structures-ice nanotubes-form spontaneously from liquid-like disordered phases at low temperatures. In the model system that comprises of TIP4P water molecules interacting with each other via short-range Lennard-Jones and long-range Coulomb site-site potentials under a periodic boundary condition in the axial direction, the phase change occurs either discontinuously or continuously depending on the path in the thermodynamic space. That the isotherms for a given diameter are found to be similar to those around the liquid-gas critical point of fluids suggests existence of a phase boundary terminated by a critical point. The apparently-complex phase behavior is accounted for by noting that the phase boundaries are layered surfaces in the three-dimensional thermodynamic space and some of the surfaces are terminated by critical lines.