Suffolk Bancorp, the Riverhead-based holding company for the 27-branch Suffolk County National Bank, has agreed to be acquired by People’s United Financial, according to documents filed with the Securities and Exchange Commission by both banks. A People’s United representative reached by phone Monday confirmed the agreement to buy Suffolk Bancorp.

The all-stock deal is worth about $402 million and is subject to approval from regulators and Suffolk Bancorp shareholders.

Like Suffolk Bancorp, Bridgeport, Conn.-based People’s United provides commercial and retail banking services. Several of its 396 branches are in Nassau and Suffolk, but most of its banks are in Connecticut, Massachusetts, Vermont, New Hampshire and Maine. Suffolk Bancorp, founded in 1890, has 25 branches in Suffolk, one in Nassau and one in Queens.

In a news release from People’s United to announce the deal, Suffolk Bancorp chief executive Howard Bluver said the deal “will benefit Suffolk Bancorp shareholders, customers and employees alike.” If the deal is approved, Bluver will take on the title of New York market president for People’s United Bank. Bluver’s role, according to People’s United, will be to “guide the integration of Suffolk Bancorp while continuing to expand the People’s United franchise in New York.”

In a conference call with analysts to discuss the deal, People’s United chief executive Jack Barnes said the deal will “provide us greater access to customers on the Eastern End of Long Island, an area where we currently do not have presence.”

Suffolk Bancorp was especially hard hit during the housing crisis in 2008 and 2009. In 2010, the bank’s federal regulator ordered it to correct “unsafe and unsound banking practices” in regard to its management, its loan quality and other issues. In late 2011, Suffolk Bancorp received delisting notices from Nasdaq because of its failure to file its quarterly earnings reports on time. Bluver, a former Securities and Exchange Commission official, was named Suffolk Bancorp’s chief executive in January 2012 and helped engineer the bank’s turnaround.

advertisement | advertise on newsday

Shares of Suffolk Bancorp rose $5.84 Monday to close at $29.33, a 25 percent gain. People’s United fell $1.24 to $13.84, an 8 percent decline.

The deal is expected to close by the end of the year.