A spectral amplitude coding-optical code division multiple access (SAC-OCDMA) system over the FSO channel is highly advantageous in providing high-speed communications with lower bit error rate (BER) and minimum multiple access interference (MAI). This work can be considered as an improvement over previous works published in the literature. This is due to the fact that a proper study of the performance of a SAC-OCDMA-FSO system has been carried out using Latin square code (LSC). This code, recently proposed, has a zero cross-correlation value and a short code length that reduces the number of used wavelengths. These properties make it better than other codes already proposed in previous works related to SAC-OCDMA-FSO systems. The performance of this system has been numerically evaluated, under fog attenuation conditions, in terms of BER with respect to different parameters such as: power transmitted, data rate, and FSO link range. For this, the maximum range of the FSO link, for a BER = 10 - 9 , has been determined for different cases of parameter values. The simulation results prove that the transmitted signal quality depends significantly on the attenuation conditions. So that, at a data rate of 1 Gbps and a transmitted power of 10 dBm, a maximum range of 2.34 km is obtained in clear weather, 1.56 km in haze, 496 m in light fog, 350 m in moderate fog, and 69.5 m in dense fog. [ABSTRACT FROM AUTHOR]