In this paper a polynomial algorithm for the prime factorization of finite, connected nonbipartite graphs with respect to the cardinal product is presented. This algorithm also decomposes finite, connected graphs into their prime factors with respect to the strong product and provides the basis for a new proof of the uniqueness of the prime factorization of finite, connected nonbipartite graphs with respect to the cardinal product. Furthermore, some of the consequences of these results and several open problems are discussed.