MOTIVATION: Reconstructing and analyzing the metabolic map of microorganisms is an important challenge in bioinformatics. Pathway analysis of large metabolic networks meets with the problem of combinatorial explosion of pathways. Therefore, appropriate algorithms for an automated decomposition of these networks into smaller subsystems are needed. RESULTS: A decomposition algorithm for metabolic networks based on the local connectivity of metabolites is presented. Interrelations of this algorithm with alternative methods proposed in the literature and the theory of small world networks are discussed. The applicability of our method is illustrated by an analysis of the metabolism of Mycoplasma pneumoniae, which is an organism of considerable medical interest. The decomposition gives rise to 19 subnetworks. Three of these are here discussed in biochemical terms: arginine degradation, the tetrahydrofolate system, and nucleotide metabolism. The interrelations of pathway analysis of biochemical networks with Petri net theory are outlined.