When methyl ketones are treated with the halogen in basic solution, polyhalogenaton followed by cleavage of the methyl group occurs.
The products are the carboxylate and trihalomethane, otherwise known as haloform.
The reaction proceeds via successively faster halogenations at the α-position until the 3 H have been replaced.
The halogenations get faster since the halogen stablises the enolate negative charge and makes it easier to form.
Then a nucleophilic acyl substitution by hydroxide displaces the anion CX3(haloform) as a leaving group that rapidly protonates.
This reaction is often performed using iodine and as a chemical test for identifying methyl ketones. Iodoform(CI3) is yellow and precipitates under the reaction conditions.
First, an acid-base reaction. Hydroxide functions as a base and removes the acidic α-hydrogen giving the enolate.
The nucleophilic enolate reacts with the iodine giving the halogenated ketone and an iodide ion.
Steps 1 and 2 repeat twice more yielding the trihalogenated ketone.
The hydroxide now reacts as a nucleophile at the electrophilic carbonyl carbon, with the C=O becoming a C-O single bond and the oxygen is now anionic.
Reform the favourable C=O and displace a leaving group, the trihalomethyl system which is stabilised by the 3 halogens. This gives the carboxylic acid.
An acid-base reaction. The trihalomethyl anion is protonated by the carboxylic acid, giving the carboxylate and the haloform (trihalomethane).