Provided is a steel pipe for a linepipe having high compressive strength, a heavy wall thickness and sour gas resistance. The steel pipe has the composition which contains by mass % 0.02 to 0.06% C, 0.01 to 0.5% Si, 0.8 to 1.6% Mn, 0.012% or less P, 0.0015% or less S, 0.01 to 0.08% Al, 0.005 to 0.050% Nb, 0.005 to 0.025% Ti, 0.0005 to 0.0035% Ca, 0.0020 to 0.0060% N, and Fe and unavoidable impurities as a balance. The steel pipe has metal microstructure where a fraction of bainite is 80% or more, a fraction of M-A constituent is 2% or less and an average grain size of bainite is 5 μm or less.