  There have been many attempts to define the notion of quasilocal mass for a
spacelike 2-surface in spacetime by the Hamilton-Jacobi analysis. The essential
difficulty in this approach is to identify the right choice of the background
configuration to be subtracted from the physical Hamiltonian. Quasilocal mass
should be nonnegative for surfaces in general spacetime and zero for surfaces
in flat spacetime. In this letter, we propose a new definition of
gauge-independent quasilocal mass and prove that it has the desired properties.
