Simulations of natural gas pipeline transients provide an insight into a pipeline capacity to deliver gas to consumers or to accumulate gas from source wells during various abnormal conditions and under variable consumption rates. This information is used for the control of gas pressure and for planning repairs in a timely manner. Therefore, a numerical model and a computer code have been developed for the simulation of natural gas transients in pipelines. The developed approach is validated by simulations of test cases from the open literature. Detailed analyses of both slow and fast gas flow transients are presented. Afterward, the code is applied to the simulation of transients in a long natural gas transmission pipeline. The simulated scenarios cover common operating conditions and abrupt disturbances. The simulations of the abnormal conditions show a significant accumulation capacity and inertia of the gas within the pipeline, which enables gas packing and consumers supply during the day time period. Since the numerical results are obtained under isothermal gas transient conditions, an analytical method for the evaluation of the difference between isothermal and nonisothermal predictions is derived. It is concluded that the nonisothermal transient effects can be neglected in engineering predictions of natural gas packing in long pipelines during several hours. The prescribed isothermal temperature should be a few degrees higher than the soil temperature due to the heat generation by friction on the pipelines wall and heat transfer from the gas to the surrounding soil.