The presence of remanent magnetization has hindered the application of generalized 3D magnetic inversion in exploration geophysics because of the unknown and variable magnetization directions. Although many authors have developed different approaches to deal with this difficulty, it remains a challenge. We have developed a new approach for inverting the total-field magnetic anomaly to recover a 3D distribution of magnetization by using a fuzzy c-means clustering technique. The inversion approximates the variation of magnetization directions with a small number of possible orientations and thereby achieves stability in recovered magnetization directions and improves the spatial imaging of magnetization magnitude. We have also found that the inverted magnetization directions can yield more information than does a standard magnetic susceptibility inversion and provide a new opportunity for magnetic interpretation. The magnitude of magnetization helps to define the configuration and structure of causative bodies in 3D, whereas the magnetization directions can help distinguish between different causative bodies and thereby assist in efforts such as geology differentiation. Thus, 3D magnetization inversion enables the complete use of the magnetic anomaly in the presence of remanent magnetization. We have used synthetic and field data sets to illustrate the algorithm, demonstrate the feasibility of geology differentiation using recovered magnetization directions, and develop a means to quantify the confidence of differentiation results.