AMG is kinda both M and Alpina...
to break things down (excluding downmarket models):
M competitor AMGs: C-Class, CLE-Class, GT-Class, SL-Class
Alpina competitor AMGs: E-Class, S-Class
in a league of its own: ONE
NOT counting Ecoboxes and SUVs.
Brabus is technically Alpina's competitor, but unlike Alpina, they have the license to market their own versions of already-factory-upgraded models. Alpinas are generally only based on mid-trim BMWs, but even that's starting to change because BMW bought out 100% of Alpina!









