The Boston Herald is declaring bankruptcy and has agreed to be sold to GateHouse Media.

The daily newspaper founded in 1846 announced Friday it filed a voluntary Chapter 11 bankruptcy petition in Delaware. Publisher Patrick Purcell didn't disclose the sale price but said the purchase is subject to court approval.

Purcell cited pension liabilities, declining revenue, digital media and growing competition for the decision. He said the company would continue its day-to-day operations.

The 64,500-circulation tabloid had some 900 employees at its peak in 2000. Today it has 240; more than half working in the newsroom. It has won eight Pulitzer Prizes in its history.

New York-based GateHouse Media publishes more than 600 newspapers in 38 states, including daily newspapers serving Cape Cod, Worcester and Fall River and Rhode Island.