It took some fancy congressional wrangling, but the Federal Trade Commission can continue one of its pet cases: rooting out antitrust violations in city taxicab regulations.

Last May, the commission filed suit against Minneapolis and New Orleans, charging that their taxi regulations discouraged competition. The situation in the two cities was symptomatic of a much wider problem, the FTC said. According to a Transportation Department study, restrictions on taxi fleet size, operating hours and other factors cost the public $800 million a year.

Not everyone agreed, however, that the industry should be turned into one of the great antitrust battlegrounds of our time. Two commissioners, Michael Pertschuk and Patricia Bailey, dissented when the commission voted to pursue the matter, and the suits set off a small firestorm on Capitol Hill.

Within days, Congress began work on an FTC appropriations bill that barred the commission from spending funds to pursue the taxi cases. And some legislators dusted off a dormant piece of legislation to exempt municipalities from antitrust actions.

The latter bill turned out to be the most important. While the FTC appropriations measure passed a couple of weeks ago -- without funds for the taxicab litigation -- a compromise version of the exemption legislation, which passed last week, put the money back.

Under the compromise, local governments will not be liable for damages in such cases but can still be prevented through court injunctions from breaking antitrust laws. The legislation closed a loophole that was opened two years ago by a Supreme Court decision that allowed municipalities to be sued for antitrust violations. Since then, several hundred antitrust lawsuits have been filed against municipal governments, and in one case, in Grayslake, Ill., a $28.5 million triple damage award swamped the town's $1.4 million budget.

An account of the machinations that led to the passage of the compromise probably would cover a full page of newsprint. Suffice it to say that almost everyone involved accuses their opponents of double-dealing, in addition to good old-fashioned hardball politicking. "This has been a case study in how a bill becomes law," says one person who was involved. "It's really been a roller-coaster ride."

Some participants say FTC officials employed questionable tactics. By filing the taxi suits just as its appropriations were coming up for review, the FTC opened itself up to attack, congressional sources say. And Sen. Ernest F. Hollings (D-S.C.), one of the opponents on the issue, charged that some FTC officials had lobbied illegally, including the making of calls to newspapers for support. The FTC denied the charges, and the Justice Department declined Hollings' request that it investigate the matter.

A congressional source, who was otherwise sympathetic to the FTC's position, said the tactics almost cost the FTC its funding for the taxicab case. "They really showed a tremendous insensitivity to political realities," the source said. "They finally got their bill passed . . . , by the skin of their teeth." FIXING PRICES . . .

The Supreme Court has ruled that retail price fixing is illegal. But some Reagan administration officials believe that there are instances in which something roughly akin to price fixing can benefit consumers. Recent FTC staff studies indicate that the administration may be correct.

The studies find that price fixing and other so-called "vertical restraints" -- manufacturers' limits on ways and places their products are sold -- may sometimes increase competition and reduce prices.

A staff analysis of the U.S. tuna-fishing industry, for instance, found that the practice in which fishing operations contract to sell tuna at a set price to processors over a certain period saved U.S. consumers between 1964 and 1980 about $12 million a year compared with the system the rest of the world uses in which the catch is auctioned.

The staff reports do not represent the view of the FTC. But the commission's chairman, James C. Miller III, reiterating statements made recently by others in the administration, suggested that the FTC might conclude in some cases that "price-maintenance," in which a manufacturer sets a fixed price on a new product for a limited period to establish a market share, is permissible if it can be proved that it would tend to keep prices down. "Generally the studies suggest that there are times when vertical restraints benefit the economy . . . , " he said.