OBR:
6.05
A batter is out when --
(a) His fair or foul fly ball (other than a foul tip) is legally caught by a fielder;
Rule 6.05(a) Comment: A fielder may reach into, but not step into, a dugout to make a catch, and if he holds the ball, the catch shall be allowed. A fielder, in order to make a catch on a foul ball nearing a dugout or other out-of-play area (such as the stands), must have one or both feet on or over the playing surface (including the lip of the dugout) and neither foot on the ground inside the dugout or in any other out-of-play area. Ball is in play, unless the fielder, after making a legal catch, falls into a dugout or other out-of-play area, in which case the ball is dead. Status of runners shall be as described in Rule 7.04