paper addresses the attitude control of nano-spacecraft with three reaction wheels and three magnetorquers in low Earth orbits, and develops algorithms to maintain control when any one of the reaction wheels completely fails. In the event of a reaction wheel failure, it is shown that the key challenge of maintaining accurate autonomous three-axis tracking is a problem of singularity avoidance in control allocation. In particular, control law singularities occur depending on the type of orbit, the environment, and the attitude, where the system is no longer controllable. Two algorithmic singularity avoidance techniques based on singularity prediction and artifici'al potential functions are proposed. In addition, an optimized reaction wheel configuration is proposed to enhance singularity avoidance capability. To illustrate the effectiveness of the singularity avoidance control laws, they are tested in simulations that include the effects of perturbing environmental torques, reaction wheel jitter, and actuator misalignment.