78In this connection the Court has also held, as regards the transfer of the place of effective management of a company from one Member State to another Member State, that that fact cannot mean that the Member State of origin has to abandon its right to tax a capital gain which arose within the ambit of its powers of taxation before the transfer (see, to that effect, Case C-374/04Test Claimants in Class IV of the ACT Group Litigation [2006] ECR I-11673, paragraph 59, and National Grid Indus, paragraph 46). Accordingly, the Court has held that, in accordance with the principle of fiscal territoriality linked to a temporal component, namely the taxpayer’s residence for tax purposes within national territory during the period in which the capital gains arise, a Member State is entitled to charge tax on those gains at the time when the taxpayer leaves the country (see N, paragraph 46, and National Grid Indus, paragraph 46).