In this paper, we characterize the natural opposition relation on the set of flags of a generalized polygon. We also investigate when a certain relation on any rank 2 geometry of finite diameter is equivalent to the opposition relation in a generalized polygon. As a consequence we obtain a new definition of generalized polygons. Finally, we also characterize the opposition relation in twin tree...