A two-level nonoverlapping Schwarz algorithm is developed for the Stokes problem. The main feature of the algorithm is that a mixed problem with both velocity and pressure unknowns is solved with a balancing domain decomposition by constraints (BDDC)-type preconditioner, which consists of solving local Stokes problems and one global coarse problem related to only primal velocity unknowns. Our preconditioner allows to use a smaller set of primal velocity unknowns than other BDDC preconditioners without much concern on certain flux conditions on the subdomain boundaries and the infsup stability of the coarse problem. In the two-dimensional case, velocity unknowns at subdomain corners are selected as the primal unknowns. In addition to them, averages of each velocity component across common faces are employed as the primal unknowns for the three-dimensional case. By using its close connection to the Dualprimal finite element tearing and interconnecting (FETI-DP algorithm) (SIAM J Sci Comput 2010; 32: 33013322; SIAM J Numer Anal 2010; 47: 41424162], it is shown that the resulting matrix of our algorithm has the same eigenvalues as the FETI-DP algorithm except zero and one. The maximum eigenvalue is determined by H/h, the number of elements across each subdomains, and the minimum eigenvalue is bounded below by a constant, which does not depend on any mesh parameters. Convergence of the method is analyzed and numerical results are included. Copyright (C) 2011 John Wiley & Sons, Ltd.