The reaction pathway of the cyclization of 2-phenoxybenzophenone into 9-phenyl-9H-xanthen-9-ol in the presence of acid and an excess of AlCl33 was studied using density functional theory. This type of reaction is known to occur during the Friedel-Crafts polycondensation of poly(aryl ether ketones) following the undesired benzoylation of nucleophilic positions ortho- to the growing polymer\'s ether groups. The formed defect acts as an undesired terminator of the polymer chain, causing severe problems in the polymer\'s melt state. A branched, multistep mechanism reminiscent of the Friedel-Crafts acylation reaction is discovered; the reaction starts with the protonation of the carbonyl oxygen, followed by intramolecular electrophilic attack on the carbonyl carbon that determines the turnover frequency of the catalytic cycle and ends by deprotonation of the Wheland intermediate.