Two days before he left office, President Carter did a favor for a political friend from North Carolina who was having trouble with the state's persnickety Republican senator, Jesse Helms.

At the behest of his pal, Gov. James B. Hunt Jr. and against the advice of trade experts at the Department of Agriculture, Carter asked the International Trade Commission (ITC) to look at the tobacco import situation.

Six months later, the Hunt-Helms byplay has expanded into what no one on Tobacco Road apparently really wanted or counted on -- a full-dress review by the ITC of the federal price support program for tobacco.

The ITC probe could tangle the Reagan administration in a stickly flap with nervous U.S. trading partners, who already are whispering of retaliation if the United States curbs tobacco imports.

Back in January, it seemed like a clever bit of political one-upmanship. Helms had been hacking away at Carter, Hunt and then-Sen. Robert Morgan, blaming them for what what he regarded as improperly low tariffs place on tobacco imports by the U.S. Customs Service.

Thus Carter's request for an ITC probe could somewhat dull the edge of Helms' complaints, and allow Democrat Hunt, regarded by many as a challenger to Helms in 1984, to score points with North Carolina tobacco growers disgruntled with imports.

North Carolina is the largest producer of flue-cured tobacco, the principal component of cigarettes. The state's crop produces cash receipts of more than $1 billion yearly.

Helms, now chairman of the Senate Agriculture Committee, has not let up the pressure. He reportedly has reiterated his views on tobacco tariffs to the administration and has left a clear impression that he will closely review names of Treasury appointees who will be in a position to make tariff decisions.

George Dunlop, the senator's chief tobacco adviser, said he has "visited" recently with possible Reagan nominees to head the Customs Service, seeking to push the case for higher duties on foreign leaf.

Key Treasury officials will be the customs commissioner -- not yet named -- and the assistant secretary for enforcement. The White House choice for that job is New York attorney John M. Walker Jr., a first cousin of Vice President Bush.

Walker's selection was announced May 13 after weeks of delay resulting from questions raised by the National Rifle Assoication. Walker declined to discuss his nomination, but said no one had ever suggested he should have a predetermined position on the tobacco tariff question.

As this goes on, the ITC is preparing to begin hearings here June 24, as part of its Carter-requested investigation, to determine if imports are impairing the controversial price-support program.

The ITC could hold that there is no harm to the program. Or it could recommend limits on imports, a move that could put the free-trade politics of Reagan to a quick test. The president could support or reject the ITC findings.

The proceedings hold the potential for giving critics of the price-support program a rare chance to spotlight the system of federally backed acreage allotments and market controls they find so objectionable.

Agriculture Secretary John R. Block, in a February letter to Hunt, outlined the peril to tobacco advocates if they continued to push for the ITC investigation, asking if the governor was prepared to bear the possible consequences.

He noted that Helms, too, had supported an ITC probe of imports and had discussed the question "on many occasions" with Reagan.

"Are you confident that public hearings . . . would not result in legislative reaction that would be adverse to the interests of tobacco producers in your and other states?" Block asked Hunt. The governor never responded to Block's letter.

Helms, sensitive to a political ambush, now says he supports the ITC investigation only because his state's farmers, principally the North Carolina Farm Bureau, want it.

Helms and other tobacco-state legislators over the years have successfully thwarted challenges to the support program, although their strength may be waning. A recent effort by Sen. Howard M. Metzenbaum (D-Ohio) to cut federal tobacco outlays drew 42 supporters and could have succeeded with a change in eight votes.

So at a time when the critics seem to be picking up ground, the ITC forum give them an unusual new opportunity. To determine the impact of imports, the ITC will have to examine closely the price-support program.

The program has had problems for a variety of reasons in the last several years, with increasing amounts of low-grade flue-cured tobacco finding their way into government warehouses because of poor marketability. Increasing government stocks have given rise to a fear that the program soon may find itself in serious economic difficulty.

The quick reaction among growers has been to blame lower-priced imports and tariffs -- which Helms and others say are unreasonably low -- for their problem.

But others in the industry contend that the problem is the price-support program itself, which automatically pushes up domestic prices and encourages farmers to grow poorer grades of tobacco that cannot compete with the imported leaf.

"The problem is not imports," said an official of the Leaf Exporters Association in Raleigh. "The major problem is that certain U.S. tobacco is overpriced and the quality is deteriorating."

U.S. farmers' costs are increased by a feature of the program that allows nonfarmers to hold tobacco-growing allotments, which they in turn lease to farmers at an average of about 50 cents a pound. Fewer than 20 percent of the allotment holders actually are growers, according to the Department of Agriculture. By some estimates, these lease fees add at least $279 million a year to farmers' production costs -- forcing the federal price support to increase and making U.S. leaf less competitive.

Even in that situation, exports help keep the U.S. tobacco farmer afloat. Exports of lead and cigarettes bring in about $2.5 billion a year; imports cost only $500 million.

"What's happening is that the politicans have miscalculated," said an industry official. "If the ITC vetoes a limit on imports, the administration and farmers are going to have to face up to changes in the support program because its problem are going to be in full public view."