SEOUL -- A new form of anti-Americanism, dramatized by the brief takeover of a U.S. government building here last week, appears to be taking root in South Korea.

The sight of leftist students shouting "Yankee Go Home" is nothing new. But the students this time seized on an issue -- resentment of U.S. trade pressures -- that has put them on common ground with conservative farmers, opposition politicians, establishment business executives and even newly inaugurated President Roh Tae Woo.

"In the coming general election," a western diplomat said, "I think every party will run against the Americans."

Another diplomat added, "Hardly a day goes by that a Korean newspaper doesn't carry an editorial saying these Americans are getting to be too much."

Despite their common anger at U.S. policies, the differing sectors of society do not really share the same ideology. Many students view the trade pressure as one manifestation of the evils of U.S. imperialism, while farmers are seeking to protect their livelihood without challenging the longstanding U.S.-South Korean alliance.

For its part, the government may simply find the growing anti-American sentiment useful as leverage in bargaining with Washington.

"They stir things up, because it helps their negotiating position," said the diplomat, who asked not to be named. "They say, 'You shouldn't push us too hard, people are really getting upset.' "

But several developments have coincided recently to fuel genuine anti-American fervor on the trade issue.

For students, the election and inauguration of a new president has put them in search of new issues.

For Roh, who was elected with only a 37 percent plurality, farmers, angered by U.S. pressure for relaxed beef and cigarette imports, are a loyal and essential constituency. In addition, talking tough on trade issues may offer one way for Roh to protect his conservative flank as he pursues the democratic reforms that he has promised.

For the United States, South Korea's $9.5 billion trade surplus in 1987, up from $4.3 billion two years ago, is no longer tolerable. To Washington, South Korea is an economically vibrant but recalcitrant nation that has refused to open its markets or revalue its currency despite years of prodding.

But South Koreans see themselves very differently, as a nation that is only now emerging from dire poverty, thanks mostly to hard work. With a gross national product of less than $3,000 per capita and a large remaining foreign debt, South Korea presents itself as too vulnerable to come in for bullying.

Perhaps more important than any economic argument is South Korea's fierce nationalism, which links farmers to students to business executives. Any suggestion of infringement on national sovereignty touches a raw nerve, calling to mind the almost unending incursions and insults from big powers that the nation had to endure through the centuries.

Roh spoke to those feelings in his inaugural address on Thursday when he promised that South Korea, "once a peripheral country in East Asia, {will} take a central position in the international community."

During his campaign, Roh also said the South Korean military would be strong enough by the early 1990s to assume command of its own defense. The United States stations 40,000 troops here to help the South Korean Army deter the communist North, and the commander of the combined forces is an American, another sore point for many South Koreans.

None of this means that Roh, or even most South Koreans, are anti-American. Middle-aged and older Koreans remember U.S. help in the Korean War with gratitude, and polls by the U.S. Embassy show continuing, although slipping, feelings of friendship among the majority of Koreans.

But many of those in the older generation warn that younger Koreans feel differently. They say trade pressure has replaced alleged U.S. support for dictatorial governments as the key issue for many students.

Choi Jang Jip, a political science professor at Korea University, said in an interview last week that the trade issue has broadened anti-American feeling on campuses.

"It's universal," he said. "It's no longer one particular segment of the student body."

Thus, when the five students occupied the U.S. Information Service library for about an hour on Wednesday, smashing windows and setting a small fire, they complained about Roh's inauguration. But they also denounced the "U.S. economic invasion" and "meddling in Korean internal affairs."

Similarly, students who clashed with police in downtown Seoul the next day protested U.S. economic policy as well as Roh's allegedly fraudulent election. And students last month demonstrated outside the U.S. Embassy in support of Korean farmers.

Cattle farmers last month emulated student tactics by staging street protests against import liberalization. During a rally before the National Assembly building, 3,000 farmers shouted slogans and threw plastic bags full of cow manure at police.

Officials here said the South Korean government has appeared more conciliatory in private talks recently. The United States is South Korea's largest market by far, and big corporations here that send cars and VCRs to America are not prepared to risk retaliation over issues involving beef, cigarettes and insurance.