We present a multiscale formulation for the numerical solution of one-dimensional three-phase flow through porous media. In the case of vanishing capillarity effects, the system of equations describing three-phase flow becomes almost hyperbolic, and the solution develops shocks and boundary layers. Under these conditions, classical numerical methods produce a solution that is either unstable or excessively diffusive. The key idea of the proposed formulation, originally presented by Hughes [Comput. Methods Appl. Mech. Engrg., 127:387-401 (1995)], is a multiple-scale decomposition into resolved -grid-scales and unresolved -subgrid-scales. Incorporating the effect of the subgrid scales onto the coarse scale problem results in a finite element method with enhanced stability properties, capable of accurately representing the sharp features of the solution. In the formulation developed herein, the multiscale split is invoked prior to any linearization of the equations. Special attention is given to the choice of the matrix of stabilizing coefficients, and a novel discontinuity-capturing technique is proposed and compared with existing formulations.The methodology is applied to the simulation of two problems of great practical interest: oil filtration in the vadose zone, and watergas injection in a hydrocarbon reservoir. These numerical simulations clearly show the potential and applicability of the formulation for solving the highly nonlinear, nearly hyperbolic system of threephase porous media flow on very coarse grids.