The invention relates to quaternary α-aminocarboxyamide derivatives of formula (I), wherein R1, R2, R3, R4, R5, R6, X, q and n are as defined in claim 1, for treating diseases and conditions mediated by modulation of voltage-gated sodium channels.