Compaction may impair soil health for decades. In a controlled experiment on clayey temperate forest soils, we assessed the effects of ground-based timber harvesting on earthworm abundance and soil structure. We compared freshly trafficked skid trails with those created 18 years ago at the same site. Earthworms were sampled in the ruts of the skid trails and in adjacent undisturbed plots. In addition, we collected undisturbed soil cores at 5 and 15 cm depths for X-ray imaging to assess soil structure. We identified five earthworm species: Aporrectodea rosea, Dendrobaena depressa, Dendrodrilus rubidus, Lumbricus rubellus, and Octolasion lacteum. Earthworm abundance was highest on 18-year-old skid trails, particularly of endogeic and juvenile anecic individuals. The abundance of adult anecics remained reduced. The X-ray data showed that imaged porosity declined sharply after trafficking (from 14.4 ± 5.0 % to 3.5 ± 1.6 % at 5 cm; and from 13.5 ± 4.9 % to 2.0 ± 1.1 % at 15 cm) but recovered at 5 cm within 18 years (12.2 ± 4.3 %), with only partial recovery at 15 cm (7.1 ± 2.5 %). Other structural parameters including biopores, pore anisotropy and Γ-connectivity (connectivity probability; dimensionless local connectivity measure, confined to the range [0,1]) and bulk density followed similar trends. However, the anisotropy of rock fragments did not recover. Pressure and shear forces during harvesting aligned the rock fragments horizontally. Our data show that earthworms can recolonize compacted forest soils, but recovery of soil structure is depth-dependent and remains incomplete at 15 cm depth after 18 years, resulting in a highly biological active layer sitting on top of a hard pan.