The dynamical evolution of the large (> 100 kpc), barred spiral galaxy NGC 6872 and its small companion IC 4970 in the southern group Pavo is investigated. We present N-body simulations with stars and gas and 21 cm HI observations carried out with the Australia Telescope Compact Array of the large-scale distribution and kinematics of atomic gas. HI is detected toward the companion, corresponding to a gas mass of ca 1.3 10^9 Msun. NGC 6872 contains ca 1.4 10^{10} Msun of HI gas, distributed in an extended rotating disk. Massive concentrations of gas (10^9 Msun) are found at the tip of both tidal tails and towards the break seen in the optical northern arm near the companion. We detect no HI counterpart to the X-ray trail between NGC 6872 and NGC 6876, the dominant elliptical galaxy in the Pavo group located 8 arcmin to the southeast. At the sensitivity and the resolution of the observations, there is no sign in the overall HI distribution that NGC 6876 has affected the evolution of NGC 6872. There is no evidence of ram pressure stripping either. The X-ray trail could be due to gravitational focusing of the hot gas in the Pavo group behind NGC 6872 as the galaxy moves supersonically through the hot medium. The simulations of a gravitational interaction with a small nearby companion on a low-inclination prograde passage are able to reproduce most of the observed features of NGC 6872, including the general morphology of the galaxy, the inner bar, the extent of the tidal tails and the thinness of the southern tail.