A Philadelphia financial constultant this week filed suit against the Federal Deposit Insurance Corp. in an attempt to undo a portion of the $1.5 billion agreement to bail out the First Pennsylvania Corp.

First Penn, the holding company for First Pennsylvania Bank, the country's 23rd biggest, last April became the largest banking entity ever to be rescued by the FDIC. The government agency put up $325 million in loans in exchange for 13 million warrents to buy First Penn at $3 a share. A group of 26 banks also put up $175 million plus an additional $1 billion line of credit for 7 million warrants.

Philip Zinman, one of First Penn's largest individual shareholders, went to the U.S. District Court in Philadelphia Wednesday seeking a permanent injunction under which the warrants would either be canceled or would be offered for sale to First Penn stockholders. According to Zinman, if the FDIC, which insures bank deposits, were to exercise its warrants and become owner of 46 percent of First Penn's stock, it would constitute a "blatant conflict of interest."

Interviewed by telephone, Zinman called the issuing of warrants to the FDIC "an unconsicionalbe price" to pay for the $325 million loan. The agreement was reached, he said, "with a gun at the head of First Pennsylvania -- it was not an arm's-length transaction."

Zinman filed his suit as a class action. However, he was one of very few stockholders who voted against the agreement at First Penn's annual meeting in May.

Apart from principle, Zinman opposes the dilution of the stock. Were the FDIC to exercise its warrents, the shareholders' interest in the corporation would drop 44 percent.

That makes the Zinman family interest one of the two largest individual interests. When the earnings are calculated on a fully diluted basis, Zinman claimed, his family will have a paper loss of $400,000 a year in dividends.

First Penn got into trouble, ironically, by investing in government securities starting in 1976. Its 1.2 billion portfolio of long-term, low-yielding securities had to be financed with more expensive short-term funds. At one point last spring, First Penn was paying 15.5 percent to finance securities yielding 8.7 percent.

Both the FDIC and First Penn refused to comment yesterday on the suit.