# What is the role of magnesium nitride in ammosamide B synthesis?

The following is a snapshot of the synthesis of ammosamide B from Synarchive:

In the final step $$\ce{Mg3N2}$$ is used to convert esters to amides or amides to amines. What is the mechanism of this process? How does the $$\ce{N3-}$$ get converted to $$\ce{H2O}?$$

• Your last phrase is cryptic, as I see no H2O here. Sep 12 at 12:38

$$\ce{Mg3N2}$$ is magnesium nitride. It reacts with $$\ce{MeOH}$$ to generate magnesium methoxide and ammonia according to online report by Buske [1]. The $$\ce{NH3}$$ thus generated is acting as nucleophile to react with the methyl ester to give the primary amide. It also removes two trifluoracetamide groups (or the $$\ce{MeO-}$$ does) to reveal the amino groups.
Quite why the authors have chosen to use this over more conventional sources of $$\ce{NH3}/\ce{MeOH}$$ (which is commercially available) is for them to explain.