A large number of metal deposits are initially extracted via surface methods, but then transition underground without necessarily ceasing to operate above ground. Currently, most mine operators schedule the open pit and underground operations independently and then merge the two, creating a myopic solution. We present a methodology to maximize the NPV for an entire metal deposit by determining the spatial expanse and production quantities of both the open pit and underground mines while adhering to operational production and processing constraints. By taking advantage of a new linear programming solution algorithm and using an ad-hoc branch-and-bound scheme, we solve real-world scenarios of our transition model to near optimality in a few hours, where such scenarios were otherwise completely intractable. The decision of where and when to transition changes the net present value of the mine by hundreds of millions of dollars.