Bacterial populations present in Hg-rich environments have evolved biological mechanisms to detoxify methylmercury and other organometallic mercury compounds. The most common resistance mechanism relies on the H+-assisted cleavage of the Hg-C bond of methylmercury by the organomercurial lyase MerB. Although the initial reaction steps which lead to the loss of methane from methylmercury have already been studied experimentally and computationally, the reaction steps leading to the removal of Hg2+ from MerB and regeneration of the active site for a new round of catalysis have not yet been elucidated. In this paper, we have studied the final steps of the reaction catalyzed by MerB through quantum chemical computations at the combined MP2/CBS//B3PW91/6-31G(d) level of theory. While conceptually simple, these reaction steps occur in a complex potential energy surface where several distinct pathways are accessible and may operate concurrently. The only pathway which clearly emerges as forbidden in our analysis is the one arising from the sequential addition of two thiolates to the metal atom, due to the accumulation of negative charges in the active site. The addition of two thiols, in contrast, leads to two feasible mechanistic possibilities. The most straightforward pathway proceeds through proton transfer from the attacking thiol to Cys159, leading to its removal from the mercury coordination sphere, followed by a slower attack of a second thiol, which removes Cys96. The other pathway involves Asp99 in an accessory role similar to the one observed earlier for the initial stages of the reaction and affords a lower activation enthalpy, around 14 kcal mol(-1), determined solely by the cysteine removal step rather than by the thiol ligation step. Addition of one thiolate to the intermediates arising from either thiol attack occurs without a barrier and produces an intermediate bound to one active site cysteine and from which Hg(SCH3)(2) may be removed only after protonation by solvent-provided H3O+. Thiolate addition to the active site (prior to any attack by thiols) leads to pathways where the removal of the first cysteine becomes the rate-determining step, irrespective of whether Cys159 or Cys96 leaves first. Comparisons with the recently computed mechanism of the related enzyme MerA further underline the important role of Asp99 in the energetics of the MerB reaction. Kinetic simulation of the mechanism derived from our computations strongly suggests that in vivo the thiolate-only pathway is operative, and the Asp-assisted pathway (as well as the conversion of intermediates of the thiolate pathway into intermediates of the Cys-assisted pathway) is prevented by steric factors absent from our model and related to the precise geometry of the organomercurial binding-pocket.