A grid-less, fully implicit, spectrally accurate algorithm for solving three-dimensional, both stationary and time-dependent, heat conduction problems in slots formed by either fixed or time-dependent boundaries has been developed. The algorithm is based on the concept of immersed boundary conditions (IBC), where the physical domain is immersed within the computational domain and the boundary conditions take the form of internal constraints. The IBC method avoids the need to construct adaptive, time-dependent grids resulting in the reduction of the required computational resources and, at the same time, maintaining accurate information about the location of the boundaries. The algorithm is spectrally accurate in space and capable of delivering first-, second-, third- and fourth-order accuracy in time. Given a potentially large size of the resultant linear algebraic system, various methods that take advantage of the special structure of the coefficient matrix have been explored in search for an efficient solver, including a specialized direct solver as well as serial and parallel iterative solvers. The specialized direct solver has been found to be the most efficient from the viewpoints of the speed of the computations and the memory requirements. Copyright © 2010 John Wiley & Sons, Ltd.