Two nuclear power plants constructed by the company that built Three Mile Island will shut down temporarily today and two more may close in the next three weeks under agreements reached yesterday between the utilities involved and the Nuclear Regulatory Commission.

Five other plants built by Babcock & Wilcox co., of Lynchburg, Va., which are already shut for various reasons, will remain closed while making changes ordered at all nine plants by the NRC staff.

"These actions satisfy completely the desires of the staff people who wanted prompt action," said NRC staff director Harold Denton."I know of no one who thinks we're not accomplishing enough."

Meanwhile, the damaged Three Mile Island 2 power plant near Harrisburg, Pa., was brought to long-term shutdown unexpectedly yesterday, five days ahead of schedule. The last remaining pressure gauge failed, an NRC spokesman at Harrisburg said, and technicians decided to take advantage of the failure to stop a reactor pump permanently rather than restarting it only to stop it again next week.

The action leaves the plant cooling slowly by natural circulation of water through its various loops of piping, a condition expected to continue indefinitely.

At the NRC meeting yesterday, Denton said Rancho Seco 1 of the Sacramento Municipal Utility District in California and Oconee 3 near Greenville, S.C., owned by Duke Power Co. of Charlotte, N.C., would close today. Another of the three Oconee units will close May 12 and the third May 19 if they have not implemented the necessary changes by then.

Duke Power President Bill Lee said that if either of the latter two plants had to close, it would be only for "a matter of days." Any overlap in closings among the three plants would be for "no more than a weekend," he said. The plants supply 30 percent of the utility's power to 1.2 million customers in the Carolinas.

Earlier this week, while the utilities were negotiating with the NRC staff on the proposed shutdowns, Lee had forecast rotating power blackouts and costs to consumers of $100 million per month if all B&W plants were closed. "Blackouts do not appear to me to be in the picture now," Lee said yesterday.

A statement from Duke Power described the changes needed as "minor." Oconee station manager J. Ed Smith told reporters in Seneca, S.C., "We feel like we are safe and we do not feel like these (changes) are necessary. . . but we will make the changes."

Both Lee and a spokesman of the Rancho Seco plant said the shutdowns would not affect consumer rates. The California unit supplies 60 percent of the power for 300,000 Sacramento Municipal Utility District (SMUD) customers around the state capital. "We're pleased with the cooperative spirit of the utilities and the NRC," said Marlen Davis, SMUD'sa manager of consumer relations.

Denton's willingness to allow two Oconee plants to remain in opeation while changes are made was a reversal of the position he took Wednesday, when he recommendied immediate shutshown of all four operating reactors. "That's because of the extraordinary measures being taken in the meantime," he said after yesterday's meeting. "They do have a concrete plan . . . they have materially improved the reliability of their system in a short interval."

A source in the NRC said the utilities only began to promise real changes after Wednesday's meeting at which Denton firmly called for closure and a majority of the five-member commission appeared to favor it.

Intensive discussions Thursday led to a commitment, in the form of letters, from the utilities to perform the changes Denton and his staff wanted. After much discussion on the merits of formalizing the agreement, the commission decided to issue an order from the staff, an action that raises the possibility of public hearings later. The staff can reopen the plants without another formal order from the commission.

A Babcock & Wilson executive, reactor division head John MacMillan, said after the meeting he thought it had been "a very conservative action." Asked if that meant he agreed with it, he replied, "I didn't say that."

All nine plants are required to make the following changes:

Upgrade the reliability of the auxiliary water supply to the reactor steam generators.

Install mechanisms to override or control the reactors' integrated control system that has in the past malfunctioned so as to cause some losses of water supply.

Add a wiring system to shut down the reactor automatically in the event of a loss of feedwater, rather than merely lowering the power as is now the case.

Analyze the particular plant response to feedwater accidents, with particular attention to methods of returning to normal operation.

Institute rigorous training for plant operators and beef up the staffing of the control rooms.

The Union of Concerned Scientists, a Massachussetts-based group critical of nuclear power, said those actions "fall seriously short" and represent "a quick fix . . . superficial and cosmetic."

The other plants, already shut down, will make the required changes before being allowed to return to operation. They are: Arkansas 1 of Arkansas Power & Light co.; Crystal River 3 of Florida Power Corp.; Davis Besse of Toledo, Ohio, Edison co. and Three Mile Island 1 of Metropolitan Edison Co. in Harrisburg, Pa.

Three Mile Island 2 will be closed at least two years because of damage in the March 28 incident. CAPTION: Picture, Davis Bessie, built by B&W on Lake Erie, is one of nine affected plants.