Foreign investment in the United States climbed 13.4 percent in 1986 to $209.3 billion, with just three countries accounting for almost three-fourths of the increase, the government said yesterday.

British corporations increased their holdings in America the most. Total British direct investment rose $7.8 billion to $51.4 billion at the end of 1986, the highest figure for any country.

The Netherlands followed with a $5.8 billion increase, but more than $1 billion of this gain reflected the purchase of Allied Stores by Canadian firm Campeau Corp., which used a Netherlands holding company to finance the transaction. Total direct investment by Dutch companies increased to $42.9 billion last year..

Japan had the third-largest increase last year and the third-largest foreign total. Total Japanese direct investment rose $4.1 billion, which put Japanese investment in the United States at $23.4 billion at the end of last year. Much of the gain reflected investments the Japanese made in their U.S. auto subsidiaries.

The top three investment countries were followed by Canada, with $18.3 billion in direct investment in the United States, up $1.18 billion from its 1985 total; Germany, with $17.36 billion in investments, up $2.54 billion from a year ago; and Switzerland, with $12.13 billion in direct investments, up $1.57 billion..

Direct investment by U.S. companies overseas climbed 13.1 percent to $259.89 billion in 1986. The report said that much of last year's increase reflected bigger loans by American companies to foreign subsidiaries to finance plant expansion.

The Commerce Department report yesterday on direct investment followed statistics released Tuesday on the U.S. net international investment position, which included not only investment in corporations and real estate but also investment in foreign stocks, bonds and bank accounts. The figures showed that total U.S. foreign debt soared to $263.6 billion in 1986.