Pentameric ligand-gated ion channels (pLGICs) mediate intercellular communication at synapses through the opening of an ion pore in response to the binding of a neurotransmitter. Despite the increasing availability of high-resolution structures of pLGICs, a detailed understanding of the functional isomerization from closed to open (gating) and back is currently missing. Here, we provide the first atomistic description of the transition from open to closed (un-gating) in the glutamate-gated chloride channel (GluCl) from Caenorhabditis Elegans. Starting with the active-state structure solved in complex with the neurotransmitter L-glutamate and the positive allosteric modulator (PAM) ivermectin, we analyze the spontaneous relaxation of the channel upon removal of ivermectin by explicit solvent/membrane Molecular Dynamics (MD) simulations. The xcexbcs-long trajectories support the conclusion that ion-channel deactivation is mediated by two distinct quaternary transitions, i.e. a global receptor twisting followed by the radial expansion (or blooming) of the extracellular domain. At variance with previous models, we show that pore closing is exclusively regulated by the global twisting, which controls the position of the xcexb21-xcexb22 loop relative to the M2-M3 loop at the EC/TM domain interface. Additional simulations with L-glutamate restrained to the crystallographic binding mode and ivermectin removed indicate that the same twisting isomerization is regulated by agonist binding at the orthosteric site. These results provide a structural model for gating in pLGICs and suggest a plausible mechanism for the pharmacological action of PAMs in this neurotransmitter receptor family. The simulated un-gating converges to the X-ray structure of GluCl resting state both globally and locally, demonstrating the predictive character of state-of-art MD simulations.