United Virginia Bankshares Inc. of Richmond has agreed to acquire Bethesda Bancorporation in Maryland, a transaction that would make UVB the first Virginia institution to operate banks in all three Washington-area jurisdictions under new interstate banking laws.

The agreement, which must be approved by federal regulators as well as authorities in Virginia and Maryland, also sets the stage for UVB to become the region's largest bank holding company, with assets of about $7.6 billion.

UVB announced its first expansion out of Virginia in March when it agreed to buy control of NS&T Bankshares Inc., the parent company of the District's NS&T Bank, if legislation allowing it to do so is passed.

Under an agreement that UVB officials announced yesterday, the Richmond holding company will pay $465 in cash for each share of Bethesda Bancorp, for a total price of $44.5 million. The price to be paid for Bethesda Bancorporation is slightly less than twice the book value of the company to be acquired, a UVB spokesman said.

Both Virginia and Maryland have passed regional interstate banking laws, clearing the way for mergers among bank companies in the two states. Similar legislation is pending in the District. Its passage is needed before UVB could complete a merger with NS&T.

"We have long sought a presence in all areas of the Washington SMSA [Standard Metropolitan Statistical Area] and we have achieved our objective and expect to devote full attention to consolidation of the three banks," a UVB official said yesterday.

Consolidation, he added, refers to UVB's plan to create greater economies of scale and, in some cases, to mesh the staffs of the three institutions. Bank of Bethesda, the principal subsidiary of Bethesda Bancorporation, would be operated as a separate bank, however, under UVB as a multibank holding company. Like NS&T Bank, Bank of Bethesda would retain its trade name as well as present management.

UVB and Bethesda Bancorporation officials said they hope to complete the merger by the second quarter of 1986.

"Our acquisition of Bethesda Bancorporation provides us with a strong presence in the ever-growing Maryland portion of the Washington metropolitan area," UVB's chairman, Joseph A. Jennings, said in a prepared statement yesterday. The proposed acquisition, Jennings added, "serves as an excellent complement to UVB's position in the Virginia market."

The merger will enable UVB, Bank of Bethesda and NS&T to strengthen their presence in the marketplace, added Louis Rowe, president of Bethesda Bancorporation.

A 1983 survey by the Bank Administration Institute cited Bank of Bethesda as the 16th most profitable institution within its peer group. The bank reported net income of $2.1 million ($23.15 a share) in 1984, compared with $2 million ($23.79) in 1983. Total assets at the end of July were $147 million.

UVB, meanwhile, reported assets of $6.6 billion at the end of June.

Yesterday's announcement is the fourth involving an interstate merger by a Virginia holding company. Besides UVB's two proposed acquisitions, Bank of Virginia has agreed to acquire Union Trust Bancorp of Baltimore, and Sovran Financial Corp of Norfolk has signed an agreement to buy D.C. National Bancorp.

UVB officials announced plans last March to seek the third component of a "three-legged stool" in their strategy to operate banks in Virginia, Maryland and the District. Banking industry sources said UVB had been involved in merger discussions until just recently with Baltimore's First Maryland Bancorp.

Neither company would confirm the existence of those talks, however. First Maryland had said it was discussing a possible merger with a larger regional bank holding company, but subsequently announced that it had broken off talks with the institution, which it did not identify.