A gyrokinetic theory is developed under a set of orderings applicable to the edge region of tokamaks and other magnetic confinement devices, as well as to internal transport barriers. The result is a practical set equations that is valid for large perturbation amplitudes [q delta psi/T = O(1), where delta psi = delta phi - nu(parallel to)delta A(parallel to)/c], which is straightforward to implement numerically, and which has straightforward expressions for its conservation properties. Here, delta phi and delta A(parallel to) are the perturbed electrostatic and parallel magnetic potentials, nu(parallel to) is the particle velocity, c is the speed of light, and T is the temperature. The derivation is based on the quantity epsilon (rho/lambda(perpendicular to))q delta psi/T << 1 as the small expansion parameter, where rho is the gyroradius and lambda(perpendicular to) is the perpendicular wavelength. Physically, this ordering requires that the E x B velocity and the component of the parallel velocity perpendicular to the equilibrium magnetic field are small compared to the thermal velocity. For nonlinear fluctuations saturated at "mixing-length" levels (i.e., at a level such that driving gradients in profile quantities are locally flattened), epsilon is of the order rho/L-p, where L-p is the equilibrium profile scale length, for all scales lambda(perpendicular to) ranging from rho to L-p. This is true even though q delta psi/T = O(1) for). lambda(perpendicular to) similar to L-p. Significant additional simplifications result from ordering L-p/L-B = O(epsilon), where L-B is the spatial scale of variation of the magnetic field. We argue that these orderings are well satisfied in strong-gradient regions, such as edge and scrapeoff layer regions and internal transport barriers in tokamaks, and anticipate that our equations will be useful as a basis for simulation models for these regions. (C) 2012 American Institute of Physics. [doi:10.1063/1.3683000]