S&T Bancorp, based in Indiana, Pa., between State College and Pittsburgh, has agreed to pay stock worth $206 million to acquire DNB Financial Corp. and its 14 branches in Philadelphia’s western suburbs.

The deal works out to $47.28 worth of S&T stock for every share of DNB stock, a record price for shares of DNB since it began trading more widely after the death of its former chief executive and lead investor, William Latoff, in 2016.

DNB, with $1.2 billion in loans and other assets, is the first acquisition in the Philadelphia area for S&T, said chief executive Todd D. Brice. S&T has about $7.2 billion in assets.

Why this deal? S&T scored “tremendous growth” in the Harrisburg-Lancaster area since buying the former Integrity Bank in 2015, so moving into Chester County next door made sense, Brice said in an interview. The bank has also opened loan offices in the Akron, Ohio; Rochester, N.Y.; and Buffalo areas in recent years.

S&T, founded in 1902, hopes to replace the maroon signs marking the former Downingtown National Bank branches with its own blue logo after winning approvals this fall. S&T, whose name stands for “savings and trust,” a nod to the 117-year-old bank’s former status before it broadened its focus to business lending and services, plans to convert DNB computer systems in February.

Brice says S&T, like other banks, needs to keep growing if it hopes to avoid being taken over itself. “You have to earn the right to be independent,” he added.

S&T president Dave Antolik said S&T will add its “pretty robust commercial and lending program,” treasury management, interest-rate hedging, and other services in DNB’s markets and can make bigger loans than DNB.

The sale follows a campaign by dissident investors J. Abbott R. Cooper of New York and John B. Thompson Jr. of Jupiter, Fla., to pressure DNB chief executive William Hieb to cut costs and find potential buyers. The dissidents persuaded one-third of voting shareholders to oppose Hieb’s allies in elections this spring, up from almost no opposition the previous year.

“At first glance [it] looks like a great result for all DNBF shareholders — really shows how a board can deliver value when they put their mind to it,” said Abbott. He added that he wants to read more about the merger terms.

The combination “is a natural cultural fit,” added Hieb.

S&T is one of several upstate Pennsylvania lenders who have bought smaller banks in faster-growing markets on their peripheries in recent years.

For example, Citizens & Northern Corp., a bank in Wellsboro near the New York State line, agreed to buy Monument Bank of Doylestown for $42.7 million in September.

The New York investment bank Keefe, Bruyette & Woods, which specializes in bank deals, advised S&T. The seller’s advisers included Allentown-based PNC FIG Advisory (formerly Ambassador Financial Group, acquired by PNC in April), and the Philadelphia law firm Stradley Ronon Stevens & Young.