By combining molecular biological, electrophysiological, immunological, and computer modeling techniques, we here demonstrate a counterbalancing contribution of TASK channels, underlying hyperpolarizing K+ leak currents, and HCN channels, underlying depolarizing Ih, to the resting membrane potential of thalamocortical relay (TC) neurons. RT-PCR experiments revealed the expression of TASK1, TASK3, and HCN1-4. Quantitative determination of mRNA expression levels and immunocytochemical staining demonstrated that TASK3 and HCN2 channels represent the dominant thalamic isoforms and are coexpressed in TC neurons. Extracellular acidification, a standard procedure to inhibit TASK channels, blocked a TASK current masked by additional action on HCN channels. Only in the presence of the HCN blocker ZD7288 was the pH-sensitive component typical for a TASK current, i.e., outward rectification and current reversal at the K+ equilibrium potential. In a similar way extracellular acidification was able to shift the activity pattern of TC neurons from burst to tonic firing only during block of Ih or genetic knock out of HCN channels. A single compartmental computer model of TC neurons simulated the counterbalancing influence of TASK and HCN on the resting membrane potential. It is concluded that TASK3 and HCN2 channels stabilize the membrane potential by a mutual functional interaction, that the most efficient way to regulate the membrane potential of TC neurons is the converse modulation of TASK and HCN channels, and that TC neurons are potentially more resistant to insults accompanied by extracellular pH shifts in comparison to other CNS regions.