NS&T Bankshares Inc. said yesterday it has acquired the Franklin Mortgage Corp. of Lake Ridge and Fairfax, Va., for $1.3 million and plans to open additional mortgage offices in Montgomery and Prince George's counties.

Officials of NS&T, which agreed conditionally earlier this year to be acquired by United Virginia Bankshares Inc., said the transaction represents NS&T's intention to develop a comprehensive real estate program in the area.

NS&T purchased Franklin, which originates $35 million to $40 million a year in residential mortgages in the region, from Stephen Adams, a Minneapolis entrepreneur. Adams bought Franklin four years ago when it was known as Kennedy Mortgage. Mark C. McVicker, Franklin's president, said Adams sold the Virginia company because he realized that none of the banks he controls would be large enough to absorb it.

Franklin will become a wholly owned subsidiary of NS&T Bankshares, with which it has had a long client relationship. McVicker said the new association will enable Franklin to reap more profit because the cost of its borrowed mortgage funds will no longer be based on the prime rate but on NS&T's cost of funds, which is lower.

Franklin's name will be changed to NS&T Mortgage Corp., and bank officials say they expect to double business in the next two years by adding offices in Montgomery and Prince George's counties. McVicker will remain as president of the subsidiary and also will become a senior vice president of NS&T.

Negotiations between Franklin and NS&T predate the UVB-NS&T announcement. On March 29, UVB announced that it has agreed to buy controlling interest in NS&T and its parent for $119 million, or more than twice book value. If approved, it will mark the first major interstate bank merger in the Washington area.

In addition to federal regulatory approval, the merger is contingent on passage of a regional reciprocal banking pact by the District of Columbia and on a ruling by the Supreme Court upholding such pacts. (The issue is pending before the Supreme Court.) NS&T will continue to operate as a separate banking banking subsidiary of UVB.