Watch a gecko take a shortcut across a window and the first thing you notice is how unbothered it looks. No glue, no suction cup, no claws dug into the frame. The toes lie flat for a moment and then hold, and the animal keeps walking as if the glass were a pavement. It is worth taking that foot apart, layer by layer, until the trick stops looking like magic and starts looking like engineering.

The staircase down to nanometres
Under a hand lens the underside of a gecko toe is not smooth. It carries a series of overlapping ridges, the lamellae, and each ridge is packed with fine hairs called setae. A seta is roughly 110 micrometres long and five micrometres thick, and the array runs at about 14,400 setae per square millimetre. That density is the number to keep in mind, because everything else follows from it.
Each seta is not a simple bristle. Its tip branches, in many species into hundreds of finer endings called spatulae, each a few hundred nanometres across. A nanometre is a millionth of a millimetre, so a spatula is smaller than the wavelength of visible light. You cannot resolve one with a school microscope, which is why the structure had to wait for electron microscopy before anyone could describe it properly.
The hierarchy is the point. A toe is one object; a lamella is a few hundred setae; a seta is a few hundred spatulae. The animal has turned one contact into millions of contacts, and each of those contacts is almost embarrassingly weak.
What the force actually is
At the scale of a spatula, contact is close enough for van der Waals interactions to matter. These are the weak, distance-dependent attractions between atoms and molecules, and they only reach across gaps of about a nanometre. A single one is trivial. Multiplied across the whole foot, they are not.
The measurement that settled the argument came from a micromachined force sensor. A single seta, pulled perpendicular to a smooth surface, produced around 40 micronewtons. Combine that with the density of the array and the adhesive stress works out to something near 576,000 newtons per square metre, a little over five atmospheres, under a patch the size of a fingertip. The theoretical radius of a spatula that would produce that force, given typical van der Waals energies, comes out at 0.13 to 0.16 micrometres, which is what the electron micrographs show. The arithmetic and the anatomy agree, which is rare enough to be satisfying.
The same experiments rule out the obvious alternatives. Capillary attraction from sweat or mucus would behave differently on a water-repellent surface than on a wetting one; the measured forces barely changed. Gecko setae are in fact strongly water-repellent themselves, with contact angles above 150 degrees, which is the opposite of what a glue-based explanation needs. There is no gland at the toe tip. The animal is dry.
Letting go is the harder problem
Sticking is easy to imagine; unsticking quickly, thousands of times a night, is the hard part. A permanent adhesive would be useless to an animal that has to run.
The mechanism is directional. To engage, the gecko presses the toe down and drags it slightly backwards, which splays the spatulae and loads them in shear. To release, it changes the angle of pull. When the spatulae are peeled away at a steep angle instead of loaded sideways, the force collapses and the toe comes off cleanly. Adhesion depends on the direction of the load more than on the surface it is touching, which is why a gecko can hang from a horizontal pane and still lift its foot in a fraction of a second.