The mechanism and spectral dependence of the quantum yield of singlet oxygen O(2)(a (1)Δ(g)) photogenerated by UV radiation in gaseous oxygen at elevated pressure (32-130 bar) have been experimentally investigated within the 238-285 nm spectral region overlapping the range of the Wulf bands in the absorption spectrum of oxygen. The dominant channel of singlet oxygen generation with measured quantum yield up to about 2 is attributed to the one-quantum absorption by the encounter complexes O(2)-O(2). This absorption gives rise to oxygen in the Herzberg III state O(2)(A' (3)Δ(u)), which is assumed to be responsible for singlet oxygen production in the relaxation process O(2)(A' (3)Δ(u), υ) + O(2)(X (3)Σ(g)(-)) → O(2)({a (1)Δ(g)}, {b (1)Σ(g)(+)}) + O(2)({a (1)Δ(g), υ = 0}, {b (1)Σ(g)(+), υ = 0}) with further collisional relaxation of b to a state. This mechanism is deduced from the analysis of the avoiding crossing locations on the potential energy surface of colliding O(2)-O(2) pair. The observed drop of the O(2)(a (1)Δ(g)) yield near spectral threshold for O(2) dissociation is explained by the competition between above relaxation and reaction giving rise to O(3) + O (O + O + O(2)) supposed in literature. The quantum yield of O(2)(a (1)Δ(g)) formation from encounter complex N(2)-O(2) measured at λ = 266 nm was found to be the same as that for O(2)-O(2).