The evolution of the structure and conductance of an Al nanowire subject to a tensile stress has been studied by first-principles total-energy simulations. Our calculations show the correlation between discontinuous changes in the force (associated to changes in the bonding structure of the nanowire) and abrupt modifications of the conductance as the nanowire develops a thinner neck, in agreement with the experiments. We reproduce the characteristic increase of the conductance in the last plateau, reaching a value close to the conductance quantum G0 = 2e 2 /h before the breaking of the nanowire. A dimer defines the contact geometry at these last stages, with three channels (one dominant) contributing to the conductance. PACS numbers: 73.63.b, 62.25.+g, 73.63.Rt, The electrical and mechanical properties of metallic nanowires have received a lot of attention [1]. Although point contacts have been studied for many years, only recently the gentle control of the distance between two metals using an STM-AFM [2] or a mechanically controlled breaking junction (MCBJ) [3] has allowed the experimental characterization of atomic contacts and the observation of quantum effects in both the conductance and the forces [2]. In a pioneering work, Scheer et al. [4] have shown, analyzing the superconducting properties of an atomic contact, how the transport properties of the system just before the breaking point depend on a few channels that they related to the atomic orbitals of the contact.The formation of necks and atomic contacts in stretched metallic nanowires has been analyzed theoretically using different approaches. The nanowire deformation can be studied by molecular dynamics simulations using either classical [5,6] or effective-medium theory potentials [7,8]. First principles calculations based on Density Functional theory (DFT) [9,10] provide a more accurate description of the mechanical properties and the electronic structure needed for the calculation of the conductance, but the large computational demand restricts most of the applications to the analysis of model geometries for the contact (e.g. monoatomic chains). Up to our knowledge, the most complete calculation of the deformation of a metallic nanowire has been presented by Nakamura et al [11], who analyzed, using DFT calculations, a Na nanowire with 39 atoms. In this simulation, the wire is elongated in steps of 0.2 or 0.4Å until it reaches the breaking point. The conductance is determined using the Landauer-Buttiker formula, where the transmission matrix is calculated from the self-consistent electrostatic potential using scattering techniques [12]. This calculation showed how the nanowire deformation was accompanied by a rearrangement of the atomic configuration, that introduces also jumps in the forces and the conductance of the system. Addressing this complex problem with a fullyconverged first-principles description would be still too computationally demanding. One possibility is to stick to accurate plane-wave (PW) DFT methods, carefully relaxing the condit...