The cerebral cortex can make direct contact with the basal ganglia and then, a few hundredths of a second later, receives back a processed contact response from the thalamus.
The contact signals are switched around in a circuit, in a loop, which starts from a limited area of the cerebral cortex. The signals first reach the subthalamic nucleus and striatum, then continue to the pallidum and substantia nigra, and then arrive at the thalamus, which in turn delivers, the now processed, signal flow to the same bark area from where the original signal emanated.
In the light of which part of the cerebral cortex directs the signal flow to the basal ganglia, one speaks of (at least) three different switching circuits or loops.
1/ The sensorimotor circuit/loop with beginning (and end) in the primary sensory cortex, in the primary and supplementary motor cortex, and in parts of the premotor cortex.
2/ The associative circuit/loop with beginning (and end) in the upper and outer parts of the prefrontal cortex and in the associative cortex areas of the parietal lobe.
3/ The limbic circuit/loop with beginning (and end) in the inside of the prefrontal cortex, in the orbito-frontal cortex and in the limbic lobe, especially its anterior part.
Common to the three circuits are:
that the starting signals from the cerebral cortex are excitatory and are mediated by glutamate,
that the starting signals from the cerebral cortex seek out partly to the subthalamic nucleus for switching o and partly to the striatum,
that nerve cells in the subthalamic nucleus are propulsive (excitatory) and are mediated by glutamate to GPi-SNr,
that the starting signals from the cerebral cortex that reach the striatum are switched to inhibitory GABA-ergic neurons of two types; one with type 1 dopamine receptors (D1) and the other with type 2 dopamine receptors (D2)
that The D1 neurons are substance-P positive and switch the signals directly to GPi-SNr and constitute the so-called "Direct pathway through the basal ganglia"
that The D2 neurons are enkephalin-positive and constitute the first step in the so-called "Indirect pathway through the basal ganglia".