The group of galaxies RXJ1340.6+4018 has approximately the same bolometric X-ray luminosity as other bright galaxy groups and poor clusters such as the Virgo cluster. However, 70 per cent of the optical luminosity of the group comes from a dominant giant elliptical galaxy, compared with 5 per cent from M87 in Virgo.The second brightest galaxy in RXJ1340.6+4018 is a factor of 10 fainter (Δm12=2.5 mag) than the dominant elliptical, and the galaxy luminosity function has a gap at about L*. We interpret the properties of the system as a result of galaxy merging within a galaxy group. We find that the central galaxy lies on the Fundamental Plane of ellipticals, has an undisturbed, non-cD morphology, and has no spectral features indicative of recent star formation, suggesting that the last major merger occurred ≳4 Gyr ago. The deviation of the system from the cluster LX−T relation in the opposite sense to most groups may be caused by an early epoch of formation of the group or a strong cooling flow. The unusual elongation of the X-ray isophotes and the similarity between the X-ray and optical ellipticities at large radii (∼230 kpc) suggest that both the X-ray gas and the outermost stars of the dominant galaxy are responding to an elongated dark matter distribution. RXJ1340.6+4018 may be part of a filamentary structure related to infall in the outskirts of the cluster A1774.