America's foreign debt soared to $368.2 billion in 1987 as the country lengthened its lead as the world's largest debtor nation, the government said Thursday.

The Commerce Department said the new debt burden was 36.8 percent higher than a revised $269.2 billion debt to foreigners that the United States was carrying at the end of 1986.The deterioration means that the country now has a debt load greater than the total debt being carried by Brazil, Mexico and Argentina combined, the Third World countries with the largest debt burdens.

Simply put, the U.S. debt means that foreigners now own more in U.S. assets than Americans own abroad.

For 1987, the government reported that foreign holdings in the United States increased 14.6 percent to $1.54 trillion. This compared to a 9 percent rise in American investments overseas, which totaled $1.17 trillion at the end of 1987.

The difference between foreign investments in this country and American holdings overseas represents the $368.2 billion debt burden the country is carrying.

As recently as 1982, the United States was the world's largest creditor nation with an investment surplus of $136.9 billion. But America's investment surplus evaporated as the country ran up huge merchandise trade deficits during the 1980s, transferring billions of dollars into the hands of foreigners to pay for color televisions, stereo equipment and automobiles.

These dollars, now in foreign hands, have been reinvested in the United States in everything from U.S. government bonds to Los Angeles real estate. The country became a net debtor for the first time in 71 years in 1985 with an investment deficit of $110.7 billion.

The new figures showing the country's debt burden widening had been widely anticipated, but they were certain to heighten the debate in this presidential election year over what Democratic critics charge is one of the greatest failures of the Reagan presidency.

Critics contend that the country's position as the largest debtor nation is eroding America's political and economic standing in the world.

In a report Wednesday, the congressional Office of Technology Assessment warned that the United States faced a "time of reckoning" when foreigners would no longer be willing to lend more money.

"As the United States sinks further into debt, foreign investors and creditors - central banks, individuals and firms - will be less inclined to commit ever-increasing amounts of capital to a $4 trillion economy on a spending spree," the OTA report said.

The rise in foreign investment in this country has sounded alarm bells and prompted calls in Congress for curbs on foreign purchases of U.S. companies and American real estate.

But President Reagan has maintained that the country's debtor status is a sign of strength, showing the eagerness with which foreigners want to invest in America.

The administration notes that the United States was a net debtor for most of the 19th century with no bad effects as European capital helped to build railroads and factories.

But many private economists contend that the country's status as the biggest debtor had jeopardized U.S. prestige. They said the decline was evident at last week's Toronto economic summit, at which the United States wielded less influence and Japan, now the world's largest creditor country, took more of a lead in the discussions.

Private economists say there is a marked difference between the 19th century net debtor period and the present. In the last century, America was a developing country and needed foreign capital to become an industrial power.

But during the 1980s, much of the foreign money has gone to finance a borrowing binge on the part of the federal government and consumers rather than being put into investments that would boost American productivity.