The Spanish government has ordered work suspended on eight nuclear plants being built in Spain by the United States.

The action was taken to protest President Carter's nuclear energy program in which Carter said last week he would seek agreements with foreign nations that would put a lid on the number of countries with access to plutonium, which is used to make nuclear weapons.

Carter insisted that Spain and other countries that buy nuclear power plants and uranium fuel for those plants from the United States walve their right to the plutonium generated by burning uranium in such plants.

The Spanish suspension of work on the eight plants poses an economic threat to the United States' two largest nuclear contractors. The Spanish government has said it might cancel more than $1 billion worth of orders with the two companies for their work on the plants.

Nucler industry sources also disclosed yesterday that Iran has called off talks with the United States that could have led to the construction in Iran of 10 nuclear power plants by U.S. contractors.

Iran is understood to have broken off the talks in a similar protest of Carter's demand that the United States have veto power over how, where and when Iran could reprocess the spent nuclear fuel and use the plutonium that would build up in the 10 plants.

The State Department refused to comment about the Spanish and Iranian developments, but a highly placed department official said privately:

"We're out to change the rules on how American nuclear power is used around the world, and when you change the rules, you have to be redy to play hard ball."

Another source said one reason Spain suspended work on the eight power plants being built by U.S. contractors is relaliation for Washington's holding up export licenses for some of the major components for the plants. The U.S. Nuclear Regulatory Commission confirmed yesterday that none of the machinery for the eight plants has been approved by the commission for export.

The machinery involved for three of the plants is being built by General Electric Co., and for the other five by Westinghouse Electric Corp. The machinery for all eight plants is worth an estimated $1.2 billion and would provide a year's work for 46,000 U.S. employees

The Spanish government was described by one source as being so upset byt eh delays in approving the export licenses that it has already asked France if it could provid the same components at the same price.

"The Spanish government has told the U.S. that we got them committed to nuclear power to start with," this source said. "Now we're telling them they can't have any more unless they agree to increasingly difficult conditions that make them more and more dependent on what they see as a changing U.S. policy."

In the last three months, the United States has told Spain that it will approve the export licenses if Madrid gives Washington a veto on where and how the spent fuel fromt he power plants is to be reprocessed. At first, the veto was to apply only to uranium fuel supplied by the United States. Then, the United States said it wanted a veto over the reprocessing of any spent fuel, no matter who supplied it.

This last condition is what has most snarled negotiations between Spain and the United States on the export licenses, an industry source said. Spain argues that it needs some of the nuclear machinery in the next three months to keep to its construction timetable for the eight plans

When uranium fuel is burned in a nuclear power, it generates heat and n the process is itself transformed into other elements. One of these is plutonium, which after exraction from the spent fuel elements can be used again to make electricity. It can also be used to build nuclear weapons.

Sources said the main reason Iran called off talks about the 10 nuclear plants is that the United States offered Iran no energy or financial compensation if it agreed to waive all rights to plutonium.