A rete mirabile (Latin for "wonderful net") is a complex of arteries and veins lying very close to each other, found in a number of vertebrates, and serving different purposes.
In birds with webbed feet, a rete mirabile in the legs and feet transfers heat from outgoing blood in arteries to the incoming blood from the veins, with the net effect that the internal temperature of the feet is much closer to the ambient temperature, thus preventing heat loss. A similar structure is seen in other vertebrate extremities, including mammalian testes, which are more productive at lower temperatures, and in fishes such as tuna, whose core temperature is higher than that of the cold deep waters they inhabit.
In some fish, a rete mirabile fills the swim bladder with oxygen, using a countercurrent exchange system where varying pH levels causes oxygen to unbind from blood hemoglobin and then come out of solution when the blood is supersaturated.
In giraffes, a rete mirabile in the neck equalizes blood pressure when the animal bends down to drink.
The ancient physician Galen mistakenly thought that humans also have a rete mirabile in the neck, apparently based on dissection of sheep, and ascribed important properties to it; it fell to Vesalius to demonstrate the error.