After the rear carriages of one train derailed onto the opposite track, another train passing by collided with it.