A nonresident alien individual or a foreign corporation engaged in trade or business within the United States during the taxable year shall be allowed a credit under section
901 for the amount of any income, war profits, and excess profits taxes paid or accrued during the taxable year (or deemed, under section
902, paid or accrued during the taxable year) to any foreign country or possession of the United States with respect to income effectively connected with the conduct of a trade or business within the United States.