The Supreme Court unanimously ruled yesterday that neither the Constitution nor federal law prohibits states from banding together to regulate the banking industry.

The decision, written by Justice William H. Rehnquist, enhances the powers of states to keep large banks in the nation's major commercial centers from entering regional markets and swallowing up smaller local banks.

Federal banking laws generally prohibit a bank holding company from taking over a bank in another state without that state's permission. But Massachusetts in 1982, and Connecticut a year later, enacted laws allowing takeovers of local banks in their states, provided that the out-of-state companies were based in New England.

The laws, similar to ones recently enacted in at least seven other states, are opposed by large banks in commercial centers, which fear they might be frozen out of the various regional banking schemes. Similar legislation is pending in several other states.

The ruling yesterday involved challenges by Northeast Bancorp Inc., which is based in Connecticut, and Citicorp of New York.

The two banks argued that Congress never intended to authorize the "discriminatory Balkanization" of the banking industry by the states, that such agreements unconstitutionally infringed on interstate commerce, and that the pacts violated the Constitution's rights to equal protection.

Rehnquist, in rejecting those arguments, acknowledged that "one predictable effect of the regionally restrictive statutes will apparently be to allow the growth of regional multistate bank holding companies which can compete with the established banking giants in New York, California, Illinois and Texas."

But Rehnquist said federal laws did not prohibit the practice. In fact, he said, a 1956 law clearly allowed it. He also said that the equal protection clause of the Constitution did not bar the regional banking restrictions.

The New England states "are not favoring local corporations at the expense of out-of-state corporations," Rehnquist wrote. "They are favoring out-of-state corporations [in the] New England region over out-of-state corporations from other parts of the country.

While that may be seen as a form of discrimination, Rehnquist said, banking has generally been seen as a matter of "profound local concern." He said, "Our country traditionally has favored widely dispersed control of banking. While many other western nations are dominated by a handful of centralized banks, we have some 15,000 commercial banks attached to a greater or lesser degree to the communities in which they are located."

Yesterday's ruling in Northeast Bancorp Inc. v. Board of Governors of the Federal Reserve System upholds both the Federal Reserve Board's conclusions and a ruling by the 2nd U.S. Circuit Court of Appeals last year that backed the board.

The board acknowledged that the New England agreements "might well lead to a significant restructuring of the banking industry." The board suggested that the justices not take the case, in part because there was a possibility that Congress might pass laws making the present controversy moot.

The Senate last September passed a bill that would have authorized the states to pass regional banking laws for five years, but the House took no action before its adjournment.