A perturbation solution correct to the second order is presented for free-surface gravity flows past a semicircular trench embedded in an otherwise horizontal bottom. The first-order solution (namely the linearized solution) is found and compared with the linearized solution for free-surface flows past a semicircular hump previously obtained by Forbes & Schwartz (1982). The perturbation expansion is then extended to the second order; the wave amplitude far downstream and the wave resistance are calculated. To examine the accuracy of the perturbation solutions and search for the solution for flows past a large trench, a numerical model for the solution of the fully nonlinear problem is proposed. A comparison of these three solutions (the first- and second-order perturbation solutions and the fully nonlinear numerical solution) reveals some interesting nonlinear features.