Adding impurities or defects destroys crystalline order. Occasionally, however, extraordinary behaviour emerges that cannot be explained by perturbing the ordered state. One example is the Kondo effect, where magnetic impurities in metals drastically alter the temperature dependence of resistivity. In Type-II superconductors, disorder generally works to pin vortices, giving zero resistivity below a critical current jc. However, peaks have been observed in the temperature and field dependences of jc. This peak effect is difficult to explain in terms of an ordered Abrikosov vortex lattice. Here we test the widespread paradigm that an order-disorder transition of the vortex ensemble drives the peak effect. Using neutron scattering to probe the vortex order in superconducting vanadium, we uncover an order-disorder transition from a quasi-long-range-ordered phase to a vortex glass. The peak effect, however, is found to lie at higher fields and temperatures, in a region where thermal fluctuations of individual vortices become significant.