A federal grand jury is investigating charges that American oil field equipment companies have made large payoffs to Mexico's government-owned oil company.

Court papers filed in Houston reveal that the grand jury, based in the District of Columbia, has spent several years investigating the allegations that millions of dollars in illegal payments were made.

Knowledgeable sources said the investigators are looking at a period in the late 1970s when oil prices were rising and Mexico was buying huge amounts of equipment in an effort to increase oil production dramatically and quickly. American firms allegedly paid bribes to officials of Pemex (Petroleos Mexicanos) in an effort to win some of the hundreds of millions of dollars' worth of contracts being awarded by the Mexicans. According to sources, federal investigators are examining the role of some high-ranking Pemex officials.

The inquiry, described by sources as a major, wide-ranging investigation, is being conducted by the Department of Justice and the U.S. Customs Service. It is apparently the first major criminal investigation under the 1977 Foreign Corrupt Practices Act.

Court papers and other sources indicate that one target of the investigation is a relatively small Houston firm, Crawford Enterprises, Inc.

In a statement released late last week in response to an inquiry by The Washington Post, Crawford Enterprises, through its Washington counsel, acknowledged the investigation, which it said covered Crawford and other American firms doing business in Mexico.

"Despite vigorous and repeated denials by Crawford Enterprises of any wrongdoing in connection with these allegations, the investigation has continued now for nearly 3 1/2 years," the statement said. The company said that Pemex and the Mexican government had looked into similar charges and found no wrongdoing in the award of Pemex contracts to Crawford.

The investigation potentially presents difficult diplomatic issues, coming at a time when the administration, with an eye on rich Mexican petroleum and natural gas deposits, has been emphasizing the close ties between the United States and Mexico.

Manuel Sandoval, a Pemex spokesman to the foreign press, said, "This is a matter to be commented on only by the office of the procuraduria general federal attorney in Mexico." Luis Arturo Timajero, private secretary of that office, said that the office was not aware of the investigation.

A number of other companies and individuals have provided the government with materials during the investigation. Among those are Dresser Industries Inc. and Solar Turbines International, a subsidiary of Caterpillar Tractor Co. These companies, which say they are not targets of the investigation, have supplied thousands of pages of documents about transactions with Crawford, Pemex and other firms doing business in Mexico, sources said.

Crawford Enterprises specializes in gas compression, oil and gas production and transmission equipment. The company's chairman is Donald C. Crawford, 47.

In addition to its Houston headquarters, the company also has offices in Tulsa, New Orleans, Englewood, Colo., and Mexico City. Statements about fees paid to a broker made in a related civil suit in Houston indicate that between 1978 and 1980 Crawford had sales in Mexico of at least $250 million and may have had sales as high as approximately $600 million. A former Crawford employe said the firm had total sales of substantially less in 1977.

According to the statement of Crawford Enterprises, Inc., "In 1977, Pemex decided to halt the waste of millions of dollars of natural gas at its oil fields by capturing and marketing rather than merely flaring it at the wellhead. CEI . . . played a significant role in the implementation of Pemex' plan. Relying on CEI's expertise, Pemex was quickly able to begin the successful capture of billions of cubic feet of this important natural resource."

The statement continued, "Four factors accounted for CEI's success in becoming one of Pemex' principal gas compression contractors: its proven experience in the industry; its aggressive delivery schedules that other firms simply could not match; its maintenance and repair of equipment installed in Mexico; and the lower costs to Pemex as a result of all the above."

A Mexican firm, Grupo Industrial Delta, S.A., which once acted as a Crawford broker and lists the same address as the address listed for Crawford International Inc. in Mexico City, has sued Crawford Enterprises, claiming that Crawford failed to pay agents' fees due it. Crawford has denied this claim.

On May 19, 1980, according to documents filed in that lawsuit, Crawford International Inc. President W. E. Hall sent Grupo Delta President Ricardo Garcia Beltran a letter terminating the arrangement, claiming "violations of the contracts and other breaches of duty."

Garcia Beltran's attorney in that suit, in a motion filed in March, said that "Senor Beltran has been informed he is a target" of a U.S. Justice Department investigation. Papers filed by attorneys for Crawford in that suit a few days later say that they were notified that "substantially all" Grupo Delta's documents "had been seized by the Mexican government for the purpose of investigating plaintiff's compliance with Mexican Internal Revenue laws . . . ."

An attorney representing Garcia Beltran said, in response to a reporter's question, that the documents had been voluntarily turned over in a routine audit by Mexican tax officials.