Khartoum says troops were defending their positions from rebel attacks .