Sudden compression of the outer magnetosphere associated with an ionospheric mass ejection