The deuteride YMn2D4.5, has been studied by means of temperature dependent neutron diffraction analysis. A magnetic transition is observed at 398 K on heating and 378 K on cooling. The transition involves both rhombohedral splitting of the diffraction lines of the high temperature cubic phase and appearance of superstructure lines. Crystallographic and magnetic parameters have been obtained from the refinement of the neutron diffraction patterns above, and below the transition. It shows that the transition involves both deuterium ordering and magnetic ordering. The competition which occurs in this compound between deuterium ordering and magnetic interactions is discussed and compared with other systems. (C) 1998 Elsevier Science S.A.