In this paper we consider S-prime graphs, that is the graphs that cannot be represented as nontrivial subgraphs of nontrivial Cartesian products of graphs. Lamprey and Barnes characterized S-prime graphs via so-called basic S-prime graphs that form a subclass of all S-prime graphs. However, the structure of basic S-prime graphs was not known very well. In this paper we prove several characterizations of basic S-prime graphs. In particular, the structural characterization of basic S-prime graphs of connectivity 2 enables us to present several inÿnite families of basic S-prime graphs. Furthermore, simple S-prime graphs are introduced that form a relatively small subclass of basic S-prime graphs, and it is shown that every basic S-prime graph can be obtained from a simple S-prime graph by a sequence of certain transformations called extensions.