Agriculture Secretary John R. Block said yesterday that the administration will give away up to $2 billion worth of government-owned surplus farm commodities in an unusual new subsidy program to increase farm exports.

Block said the program, partly a response to growing trade-protectionist pressure from Capitol Hill, is intended to show that the United States is "not going to stand idly by" while other producing nations subsidize agricultural exports.

Details of the three-year program are not final, Block said, but it will be designed to expand exports and "concentrate on challenging markets" where other countries have displaced or undermined U.S. sales.

The secretary acknowledged in an interview that the new program "is not good policy" and that it runs counter to the Reagan administration's professed adherence to free trade.

But, he said, the United States has "no other alternative" in the face of a continuing loss of markets to foreign competitors.

The surplus commodities will be given to U.S. exporters as a "bonus" to permit them to sell their products -- bought from U.S. farmers at the going rate -- at cut rates overseas.

In theory, the American products would be more competitive at the discounted lower rates.

The administration agreed to the subsidy scheme during negotiations with Senate farm-state Republicans last week over a budget compromise.

A variety of similar farm trade-subsidy proposals are pending before the House and Senate Agriculture committees, which have begun writing a new farm bill.

Block said protectionist sentiment in Congress "has reached a fever pitch . . . there's no denying it. It is a consideration that other countries do not appreciate. But I hold out reasonable hope . . . that we will be able to sit down together and make adjustments in our programs."

The secretary said the new program, which is expected to begin by June 1, "is destined to be a more concerted effort" than earlier attempts to "send a message" that this country will defend its traditional farm markets.

"This program gives a good indication of what we are willing to do," Block said.

The administration believes that, at the recent economic summit in Bonn, France refused to agree to set a date for a new round of trade talks largely because it feared the talks would focus on cutting European farm subsidies.

There is a major debate within the European Economic Community (EEC) over lowering the price of grain, with Germany the lone holdout for retaining a higher price.

While foreign subsidies are seen as hurting American farm exports, which have decreased for the past four years, the biggest hurdle to overseas agricultural sales is the strong dollar. This increases the cost of U.S. wheat that, with a weaker dollar, was able to compete even with subsidized foreign grains.

Since taking office in 1981, Block and the administration have cajoled other farm-exporting nations, mostly in vain, to reduce their agricultural subsidies to assure a freer flow of farm goods into world markets.

The United States has made several large subsidized sales of flour and dairy products to emphasize the point.

But pressure on the administration to act more forcefully has mounted in recent months as exports continue a slide that began in 1981 and as a strong dollar has made American farm products more costly on the world market.

Many experts link the faltering domestic farm economy to the erosion of exports, which account for about 40 percent of U.S. production.

"We're getting once again into a surplus situation, prices are depressed and everyone is saying, 'What are we going to do?' " Block said.

Although the Agriculture Department estimates that U.S. export volume will increase this year for the first time since 1980, the value will drop to around $35 billion from last year's $38 billion and the 1981 high of $43.8 billion.

Block said a main target of the new program is the EEC, which, despite some efforts at reform of its farm-subsidy policies, has "stolen" sales of meat, poultry, flour and grains in traditional American markets.

Of the new U.S. program, Block said: "This is penny ante compared to what the EEC does . . . . I don't know if this will change their actions . . . . I'm hopeful we'll all come to our senses and figure out some disciplines and bring some order to agricultural trading."