Perpetual American Bank, the region's largest thrift institution, has agreed to buy four branch offices in Virginia's Tidewater area for an undisclosed amount from Atlantic Permanent Federal Savings and Loan Association of Norfolk.

An agreement in principle, which was announced by officials of the two thrifts yesterday, calls for Perpetual American to buy four Atlantic Permanent branches located in Suffolk, Newport News, Hampton and Norfolk. The agreement also calls for Perpetual American to assume control of $141 million in deposits at the four branches; loans held by Atlantic Permanent will not be included in the transaction.

Officials of both companies refused, under terms of the agreement, to discuss the value of the transaction or other details. They emphasized that the agreement was voluntary and that federal regulators played no role in Atlantic Permanent's decision to sell the branches to Perpetual American. The transaction is subject to approval by the Federal Home Loan Bank Board, however.

The sale, which is expected to be completed within four months, is critical to a restructuring program that Atlantic Permanent recently disclosed after reporting sharp declines in earnings. Atlantic Permanent reported a deficit of $6 million for the fiscal year that ended Dec. 31. The S&L's net worth, although still below the minimum regulatory requirement, improved in the first quarter of the current fiscal year when it reported a deficit of $3.8 million.

A huge deficit developed at Atlantic Permanent after management transferred $8 million to the S&L's reserves to cover possible loan losses, according to Edgar S. Everhart, chairman and president of the Norfolk firm.

Perpetual American's purchase of the four branches, when combined with a $2 million profit that Atlantic Permanent reported in the first quarter, will "substantially improve future earnings capabilities" and is expected to "bring the association in full compliance with Federal Home Loan Bank net worth requirements," Everhart said.

Everhart said management decided several months ago to divest three or four branches and emphasize a wholesale-business operation in which Atlantic Permanent will primarily originate and sell mortgage loans. As part of that strategy, officials yesterday announced plans to open a new mortgage-banking office in Newport News.

The purchase of Atlantic Permanent's branches would extend Perpetual American's reach into a market area that is considered vital to its long-term strategy of operating offices throughout Virginia, Maryland and the District. Perpetual American was a D.C. thrift until 1981, when it acquired a Virginia S&L in a merger and moved to Alexandria under a new charter. Perpetual American had been allowed to operate a limited number of S&Ls in Maryland under a grandfather clause, but obtained the right to branch throughout the state when it acquired another Maryland thrift in a merger.