The traveling salesman problem, an NP-hard problem in combinatorial optimization, is solved in several studies by decomposing the problem into subproblems using a clustering technique. The subproblems are then solved individually. To overcome some of the limitations of the clustering technique, this paper proposes a two-stage approach for decomposing the cities into groups. In the first phase, the groups of cities are identified using a marginally modified version of factor analysis. In the second phase, the cities are assigned to groups using an integer-programming model. The proposed approach has the flexibility to allow the user to either identify the required number of groups in advance or consider it as a dependent variable. Using algorithms that are available in many commercial software packages is another advantage of the proposed approach.