We study a restricted class of self-avoiding walks (SAWs) which start at the origin (0, 0), end at (L, L), and are entirely contained in the square [0, L] × [0, L] on the square lattice . The number of distinct walks is known to grow as . We estimate λ ≤ 1.744 550 ± 0.000 005 as well as obtaining strict upper and lower bounds, 1.628 < λ < 1.782. We give exact results for the number of SAWs of length 2L + 2K for K ≤ 0, 1, 2 and asymptotic results for K ≤ o(L1/3). We also consider the model in which a weight or fugacity x is associated with each step of the walk. This gives rise to a canonical model of a phase transition. For x < 1/μ the average length of a SAW grows as L, while for x > 1/μ it grows as L 2. Here μ is the growth constant of unconstrained SAWs in . For x ≤ 1/μ we provide numerical evidence, but no proof, that the average walk length grows as L4/3. Another problem we study is that of SAWs, as described above, that pass through the central vertex of the square. We estimate the proportion of such walks as a fraction of the total, and find it to be just below 80% of the total number of SAWs. We also consider Hamiltonian walks under the same restriction. They are known to grow as on the same L × L lattice. We give precise estimates for τ as well as upper and lower bounds, and prove that τ < λ.