Using x-ray scattering, we have studied the nematic to smectic- phase transition of the liquid crystal butyloxybenzilidene-octylaniline confined in an aerosil network. We find that the disorder introduced by the aerosil network destroys the long-range nature of the phase transition, and that the transition becomes similar to that observed in a finite-size system, with finite low-temperature correlation lengths of the ordered moments and a power-law behavior of the order parameter with respect to the reduced temperature observable in a limited temperature range. We also show evidence for a systematic evolution of the effective order parameter critical exponent beta with increasing disorder.