Polymesoda expansa spends a considerable portion of its life exposed to air in mangrove swamps where salinity fluctuates greatly. Thus, the aim of this study was to evaluate the effects of aerial exposure (transfer from 10 per thousand brackish water directly to air) or salinity changes (transfer from 10 per thousand brackish water directly to 30 per thousand seawater) on nitrogen metabolism in P. expansa. We concluded that P. expansa is non-ureogenic because carbamoyl phosphate (CPS) III activity was undetectable in the adductor muscle, foot muscle, hepatopancreas and mantle when exposed to brackish water (control), seawater or air for 17 days. It is ammonotelic as it excretes nitrogenous wastes mainly as ammonia in brackish water or seawater. After transfer to seawater for 17 days, the contents of total free amino acids (TFAA) in the adductor muscle, foot muscle, hepatopancreas and mantle increased significantly. This could be related to an increase in protein degradation because exposure to seawater led to a greater rate of ammonia excretion on days 15 and 17, despite unchanged tissue ammonia contents. Alanine was the major free amino acid (FAA) in P. expansa. The contribution of alanine to the TFAA pool in various tissues increased from 43-48% in brackish water to 62-73% in seawater. In contrast, in clams exposed to air for 17 days there were no changes in alanine content in any of the tissues studied. Thus, the functional role of alanine in P. expansa is mainly connected with intracellular osmoregulation. Although 8.5-16.1% of the TFAA pool of P. expansa was attributable to glutamine, the glutamine contents in the adductor muscle, foot muscle, hepatopancreas and mantle were unaffected by 17 days of exposure to seawater. However, after exposure to air for 17 days, there were significant increases in ammonia content in all these tissues in P. expansa, accompanied by significant increases in glutamine content (2.9-, 2.5-, 4.5- and 3.4-fold, respectively). Simultaneously, there were significant increases in glutamine synthetase activities in the adductor muscle (1.56-fold) and hepatopancreas (3.8-fold). This is the first report on the accumulation of glutamine associated with an upregulation of glutamine synthetase in a bivalve species in response to aerial exposure, and these results reveal that the evolution of glutamine synthesis as a means for detoxification of ammonia first occurred among invertebrates.