In urban drainage systems, a sudden increase in the flow rate can cause the transition of the flow from open channel to pipe flow, and the entrapment of large air pockets in sewers, which might result in serious geysers and water-hammer like pressure events. This paper presents a numerical analysis of flow processes associated with the pressurization and release of an air pocket in order to study its influence on transient pressure in a horizontal pipe with an end orifice. The influence of the air pocket inside the pipe on the peak pressure can be described in two distinct regimes. In regime I for the pipe with a small orifice, the peak pressure is modulated by the pressurization and expansion of the air pocket and its subsequent damping. In regime II for the pipe with a large orifice, air can be quickly expelled, and the water column directly impinges on the pipe end wall and causes water-hammer like pressure. With the increase of the orifice size, the peak pressure decreases due to the change in the water velocity. In the study cases, the peak pressure in regime I is about two times the inlet pressure, while it can be more than forty times in regime II.