Mobil Oil Corp. has taken an option to purchase the undeveloped 3,000 acres of the new town of Reston from another energy giant, Gulf Oil Corp., the two companies announced yesterday.

No price was disclosed, but based on current land values in Reston, the deal could be worth as much as $40 million - probably the biggest land transaction in Fairfax County's history.

Gulf, through its subsidiary, Gulf Reston Inc., would continue to operate already developed properties, which include three shopping centers and 1,000 apartments in the 15-year-old town.

Mobil said the purchase, which has to be approved by the firm's executive committee, "is not related in any way" to its contruction of a refining and marketing headquarters about 10 miles away at Gallows Road and Rte. 50 in the county.

Since Gulf Reston put Reston up for sale last fall, community leaders have been apprehensive about what would happen to their new town, which is still less than half developed. Its population of 31,000 is expected to grow to 85,000 under present zoning.

News of Mobil's purchase was praised by Reston leader Joanne Brownsword. "If Mobil follows the master plan, it means we will continue to have one big developer, which we need," she said. "If Reston were split up, that would be the worst thing."

Reston was the creation of Robert E. Simon, a New Yorker who was part visionary, part businessman. His dream was to create a well-planned, well-designed urban complex that would be in harmony with the rolling countryside where it would be built - 20 miles west of Washington.

Simon, who borrowd heavily to finance his dream, ran out of cash when sales in the early years - the late 1960s - did not meet projections.

In late 1967, Gulf Oil, which had provided Simon with some of his money, bought him out and promised to carry out his dream, though with a more attention to cost-effectiveness.

For the first years of its involvement, Gulf Reston was pilloried by architectural purists for bringing a cutrate quality to the town, which had been quickly celebrated for the design of its original town house clusters and its Lake Anne Village Center.

In 1974 and 1975, a county imposed sewer moratorium slowed development, but since then "the market has been extremely strong," a Gulf Reston spokesman said yesterday.

While Gulf has been selling off its real estate holdings, saying it wanted to concentrate on energy, Mobil has been moving in the opposite direction. It is developing a condominium complex in Hong Kong that will house 50,000 people, and has acquired major land holdings in California, Texas, Florida, Georgia and Arlington, where it bought Colonial Village apartments. But it lost in an effort to buy the new town of Irvine, Calif., last year.

Citing uncertainties in the energy business - environmental controls and dependency on foreign oil production - a Mobil spokesman explained the company's diversification: "We thought we would hedge our bets by broadening our base of earnings."

There are about 325 businesses and industries in Reston - ranging from an ice cream store to the U.S. Geological Survey headquarters, where 8,8000 people are employed.

Reston also is home for 27 national associations, ranging from the National Turkey Association to the American Newspaper Publishers Association.

There are plans for a town center, which would include a large shopping center as well as office buildings, but its development has been held up by Reston's poor transportation links with other parts of the county.

There is no major north-south road linking Reston with Rte. 1-66 or Rte. 50, two heavily traveled roads in Fairfax County.

The new town is divided in two by the Dulles Airport Access Road, but only commuter buses are able to use the road to Washington. However, there is a growing movement supporting construction of parallel lanes that could be used by commuters and trucks.

Reston's development is guided by a master plan that sets an overall density - about 15 persons per acre - but leaves the developer with considerable freedom to vary densities at different locations. For example, apartments and townhouses can be built near single-family houses - something that usually is prohibited in conventional zoning.

When Reston was started, there was considerable optimism that it and other new towns would have a major impact on urban development. Since then, a number of new towns - including Reston - have encountered financial difficulties, and some have gone bankrupt.

After encouraging new town development by underwriting development loans, the Department of Housing andUrban Development has retreated from its activist role.