Greece will become the tenth member of the Common Market by 1981 under an agreement reached with the European Economic Community yesterday that is likely to set the pattern for expansion of the EEC to 12 nations covering most of western Europe.

After all-night talks in Burssels that concluded more than two year of sometimes difficult negotiations, Greece and the EEC reached agreement on policies for farm products and mugrant workers that could be the model for similar EEC agreements with Spain and Portugal.

That would extend the EEC's control fo trade and growing influence over currency values from the North Atlantic to the Miditerranean. It would also bolster both economically and politically the democratic governments that only recently replaced dictatorships in Greece, Spain and Portugal.

EEC and Greek government officials, who called yesterday's agreement a "historic moment" in European history, said they expect the formal treaty to be signed mext summer and approved by the nine present EEC members in time for Greece to enter the EEC by Jan. 1, 1981.

Greece will be the Common Market's first new member since the original six-West Germany, France, Italy, Belgium, the Netherlands and Luxemburg-were joined by Britain, Denmark and Ireland in 1973.

While the present nine members have been philosophically in favor of taking in Greece, Spain and Portugal, which have replaced totalitarian regimes with democratic governments in recent years, they have feared the agricultural competition and high unemployement rates of the three Meidterranean nations.

Farmers in southern France and Italy worry that they will be hurt by competition from those in Spain, Portugal and Greece who sell some of the same crops at lower prices, while heavily industrialized Germany fears it will be flooded with unemployed workers form the three countries taking advantage of free movement of labor within the ECC.

In the compromise agreement reached by Greek and EEC negotiators yesterday, Greece will have the same five-year transition period that Britain, Denmark and Ireland had before assuming, by 1986, full EEC rights and duties, including duty-free trading rights within the Common Market for such important Greek agricultural products as wine, olive oil and tobacco.

However, for two of its agricultural products, tomatoes and peaches, the trnasition period will be seven years, giving French and Italian farmers two more years before facing the new competition.

Greece also ageed to a seven-year transition period before its workers will be allowed free circulation within the EEC. However, the EEC agreed in the meantime to extend EEC job and social benefits protection to the more than 150,000 Greek migrants already working in West Germany and elsewhere inside the Common Market.

The Greek press was jubilant yesterday about the agreement. In Burssels, Greek Foreign Minister George Rallis told reporters that "December 21st will represent for Greece its first step on a new road which will be important in the destiny of the Greek people-a people which has suffered so much."

Negotiations between the EEC and Spain have been under way since October and talks with Portuagal on its EEC application are expected to begin next year.