Concentrations of extracellular divalent cations (Ca2+ and Mg2+) fall substantially during intensive synaptic transmission as well as during some pathophysiological conditions such as epilepsy and brain ischemia. Here we report that a synthetic serine protease inhibitor, nafamostat mesylate (NM), and several of its analogues, block recombinant TRPM7 currents expressed in HEK293T cells in inverse relationship to the concentration of extracellular divalent cations. Lowering extracellular Ca2+ and Mg2+ also evokes a divalent-sensitive non-selective cation current that is mediated by TRPM7 expression in hippocampal neurons. In cultured hippocampal neurons, NM blocked these TRPM7-mediated currents with an apparent affinity of 27 μM, as well as the paradoxical Ca2+ influx associated with lowering extracellular Ca2+. Unexpectedly, pre-exposure to NM strongly potentiated TRPM7 currents. In the presence of physiological concentrations of extracellular divalent cations, NM activates TRPM7. The stimulating effects of NM on TRPM7 currents are also inversely related to extracellular Ca2+ and Mg2+. DAPI and HSB but not netropsin, blocked and stimulated TRPM7. In contrast, mono-cationic, the metabolites of NM, p-GBA and AN, as well as protease inhibitor leupeptin and gabexate failed to substantially modulate TRPM7. NM thus provides a molecular template for the design of putative modulators of TRPM7.