Using small-angle neutron scattering, we have imaged the magnetic flux line lattice (FLL) in the d-wave heavy-fermion superconductor CeCoIn5. At low fields we find a hexagonal FLL. Around 0.6 T this undergoes what is very likely a first-order transition to square symmetry, with the nearest neighbors oriented along the gap node directions. This orientation of the square FLL is consistent with theoretical predictions based on the d-wave order parameter symmetry. 14 . However, in the latter case with an orientation rotated 45• with respect to theoretical predictions 10,11,12,13 . In addition, it is worth pointing out that studies of the FLL symmetry in LSCO as well as in YBa 2 Cu 3 O 7−δ (YBCO) are susceptible to potential complications in interpretation due to the orthorhombic crystal structure, which leads to formaion of twin planes which can pin the FLL 15 . On the other hand, the crystal structure of CeCoIn 5 is tetragonal which excludes twinning, and this material may therefore turn out to be a better example of a "typical" d-wave superconductor.Here we report FLL imaging in CeCoIn 5 , obtained by small-angle neutron scattering (SANS). The FLL undergoes what appears to be a first-order, field driven transition from a hexagonal to a square FLL is observed. A square FLL has not previously been observed in a heavy fermion superconductor, and furthermore this is the first example of a square FLL in a d-wave superconductor oriented with the nearest neighbor directions parallel to the nodal directions of the gap.The SANS experiment was carried out at the D11 small-angle neutron scattering diffractometer at the Institut Laue-Langevin, Grenoble, France. Single crystals of CeCoIn 5 were grown from an excess indium flux 3 , and had a T c = 2.3 K and B c2 (0) = 5.0 T parallel to the c-axis. The sample was composed of four single crystals with thicknesses t = 0.16 − 0.2 mm mounted side by side, each of which was individually aligned. The rather thin samples were necessary, due to the strong absorbtion of low-energy neutrons by In. The total mass of the sample was 36 mg. Incident neutrons with wavelength λ n = 0.6 nm and a wavelength spread ∆λ n /λ n = 10% were used, and the FLL diffraction pattern was collected by a 64 × 64 (1 cm 2 ) position sensitive detector. For all measurements, the sample was field cooled to 50 mK in a dilution refrigerator insert, placed in a cryostat with a superconducting magnet. Magnetic fields in the range 0.3 to 2 T were applied parallel to the crystalline c-axis, and background subtraction was performed using measurements following a zero-field cooling.In Fig. 1 we show FLL diffraction patterns for applied fields of 0.3, 0.6 and 2 T. The images were constructed by summing a number of measurements at different angular positions, in order to satisfy the Bragg condition for the different peaks. A clear evolution of the FLL symmetry and orientation is evident. At the lowest field, twelve peaks are observed evenly distributed on a circle in reciprocal space as shown in Fig. 1(a). This corresponds ...