When modeling wave propagation, truncation of the computational domain to a manageable size requires nonreflecting boundaries. To construct such a boundary condition on one side of a rectangular domain for a finite-difference discretization of the acoustic wave equation in the frequency domain, the domain is extended on that one side to infinity. Constant extrapolation in the direction perpendicular to the boundary provides the material properties in the exterior. Domain decomposition can split the enlarged domain into the original one and its exterior. Because the boundary-value problem for the latter is translation-invariant, the boundary Green functions obey a quadratic matrix equation. Selection of the solvent that corresponds to the outgoing waves provides the input for the remaining problem in the interior. The result is a numerically exact nonreflecting boundary condition on one side of the domain. When two nonreflecting sides have a common corner, the translation invariance is lost. Treating each side independently in combination with a classic absorbing condition in the other direction restores the translation invariance and enables application of the method at the expense of numerical exactness. Solving the quadratic matrix equation with Newton’s method turns out to be more costly than solving the Helmholtz equation and may select unwanted incoming waves. A proposed direct method has a much lower cost and selects the correct branch. A test on a 2D acoustic marine seismic problem with a free surface at the top, a classic second-order Higdon condition at the bottom, and numerically exact boundaries at the two lateral sides demonstrates the capability of the method. Numerically exact boundaries on each side, each computed independently with a free-surface or Higdon condition, provide even better results.