BobKamman
Level 15

Now that you have found Pub 54, where does it says that an employee of a foreign company, working in that country, must pay US self-employment tax?  We can't even start to answer your question without knowing what country is involved. 

Bilateral Social Security (Totalization) Agreements

The United States has entered into agreements with some foreign countries to coordinate social security coverage and taxation of workers who are employed in those countries. These agreements are commonly referred to as “totalization agreements.” Under these agreements, dual coverage and dual contributions (taxes) for the same work are eliminated. The agreements generally make sure that you pay social security taxes to only one country.

Generally, under these agreements, you will only be subject to social security taxes in the country where you are working. However, if you are temporarily sent to work in a foreign country and your pay would otherwise be subject to social security taxes in both the United States and that country, you can generally remain covered only by U.S. social security.

You can get more information on specific agreements at Social Security Totalization Agreements and IRS Totalization Agreements.