Sweden's voters dealt a major blow to opponents of nuclear power today, overwhelmingly rejecting a proposal to phase out the country's ambitious nuclear program over the next 10 years.

Today's referendum, prompted by the Three Mile Island nuclear accident near Harrisburg, Pa., almost exactly a year ago, was being watched closely throughout Europe and the United States as a weather vane for the future of the antinuclear movement worldwide.

The antinuclear campaigners' warnings about the long-range dangers of nuclear power, punctuated with constant references to the Three Mile Island accident, appeared to have been outweighed by the pronuclear forces' warnings of immediate and possibly heavy costs of abandoning reactors already built, importing more coal and oil and adjusting operations in industries dependent on electricity, with the possible loss of jobs.

This support for jobs over ecology was perhaps best illustrated by the 3-to-1 vote for nuclear power in the district around Sweden's largest operating nuclear plant at Barsebak, north of Malmo.

Slightly more than 38 percent of those voting supported the proposal by the antinuclear movement of environmental, youth, women's and farmers' groups to shut down the six nuclear reactors now generating one-fourth of Sweden's electricity -- more nuclear power per person than in any other country.

The majority of those voting supported two, almost identical, pronuclear proposals to use these reactors and build six more reactors to produce more than 40 percent of Sweden's electricity for at least 25 years while alternative sources of energy are being developed.

All of Sweden's political parties had pledged to support the result of the legally nonbinding referendum. But the outcome could put the right-of-center coalition government's Prime Minister Thorbjorn Falldin, who leads the farmer- and environmentalist-based Center Party, in a difficult position. t

Falldin rose to power through his opposition to nuclear energy and resigned from an earlier coalition government in 1978 in a disagreement on the nuclear energy issue.

Falldin said tonight, "We will abide by the outcome" of the referendum, despite his deeply felt convictions. If he tries to delay operation of the six nuclear reactors, he risks bringing down the coalition government, which holds a single-vote majority in parliament.

Both of the Center Party's coalition partners -- the Conservative and Liberal parties and the powerful opposition Social Democrats, which is the largest single party in parliament -- supported one of the pronuclear alternatives presented in today's referendum. Only the Swedish Communist Party joined Falldin's Center Party and antinuclear activitists in campaigning for the proposal to phase out nuclear power quickly.

The vote would never have taken place if the Three Mile Island accident had not occurred last March. It had a deep and lasting impact here, forcing political leaders to agree to the referendum, to remove the nuclear issue from last September's parliamentary elections.

During the sometimes strident referendum campaign, which dominated Swedish media and public discussion for several months, the looming concrete stacks of the stricken Three Mile Island nuclear plant cast a long shadow here. The image flickered across the screen on the nightly news, and the accident was dissected repeatedly, as though it had happened here and only yesterday.

"Another half-hour at Harrisburg and catastrophe would have occurred," antinuclear campaign leader Lennart Daleus warned in the campaign's climatic prime-time television debate Friday night. "That's why we are debating nuclear power and why this referendum is taking place."

The antinuclear campaign literature featured wild speculation that "had the worse come to the worst" at Three Mile Island, "thousands of people could have died from radiation within a few days, tens of thousands could hav contracted cancer within 10 to 20 years and millions more would have lived in fear of cancer, while thousands of square miles could have been made uninhabitable for generations by radioactive pollution. A disaster on this scale can also occur at Swedish nuclear plants."

This apocalyptic vision was countered by pronuclear campaigners, who were backed by both businesses and labor unions. They painted a frightening picture of the economic cost of quickly phasing out nuclear power. They frequently cited a government study to show that countless jobs would be lost unless about $20 billion were spent to import much more oil and coal, and to construct alternative plants to generate electricity for the pulp and paper, chemical, steel and aluminum industries.

"We already have employment and other economic problems to face during the 1980s," argued Rune Molin of the labor-packed Pronuclear Alternative. Using nuclear power for at least another 25 years, he said, "gives us time to produce alternative energy systems based on renewable resources," such as water, wind, wood and sun.

The antinuclear campaigners contended that these alternatives could be developed quickly, creating new jobs, and that energy conservation has not been pursued vigorously in Sweden, which consumes more energy per person than any other Western European country.

The referendum here was the third in a year on nuclear energy in Europe. Austria is now trying to decide what to do with its single, partially completed nuclear power station after voters decided by a 1 percent margin last November to stop construction. The Swiss, in a referendum held earlier last year, decided on a national inquiry into alternative energy sources before expanding their already comparatively large nuclear power program.

Denmark, Norway and Ireland have indefinitely postponed decisions and referendums on the development of nuclear energy have been suggested. France, West Germany, Britain and Belgium are steadily expanding their substantial nuclear generating capacities, despite some opposition.

In the United States, there are about 70 nuclear power stations in service and about 90 more under construction. Facing mounting economic and energy problems in an election year, President Carter's position on nuclear power has become fuzzier since he promised to make it "the last resort" during the 1976 campaign.