Rick Jones anticipated the end, but it still shocked him when it arrived.

After 161 years of publishing, the Martinez News-Gazette — among the longest-running papers in California, if not the longest — plans to print its final edition on Sunday, a painful end for one of the only news agencies committed to covering the city of nearly 40,000, which serves as the seat of Contra Costa County.

“We were told we were losing money, and I don’t doubt that,” said Jones, who has served as the paper’s editor for about five years as one of two full-time employees. “We knew it was coming.”

It’s uncertain whether the news outlet will continue publishing online, Jones said. Owners of the paper, he said, haven’t responded to his requests for more information on what comes next. What is certain, however, is that the journalism industry remains under threat in the Bay Area and across the country.

A study published last month by PEN America, a nonprofit dedicated to supporting free expression through the written word, found that total newsroom employment across the country — newspapers, TV, radio and digital — fell roughly 25% from 2008 to 2018, while almost half of all newspaper newsroom jobs, 47%, were eliminated.

Edward Wasserman, dean of UC Berkeley’s journalism school, said people can turn to the internet to share and exchange opinions with others who have the same enthusiasm for something, but it’s not the same as looking at the same paper every morning and reading about hyper-local stories on politics and crime, as well as announcements and features specific to life in Martinez.

“There’s not really a replacement institution emerging,” Wasserman said. “It’s not the same thing as having a paper that chronicles a shared reality for a given community.”

The News-Gazette began publishing in September 1858 and is said to have endorsed Abraham Lincoln’s presidential bid. Former state Sen. William Sharkey bought the paper in 1906 and combined it with another local paper, calling it the Contra Costa Gazette, according to the former owner’s 89-year-old grandson, Bill Sharkey III.

In the middle of the 20th century, the paper had about 50 employees and covered the county and city of Martinez, while also offering national and international news through the Associated Press and United Press International wires.

“We were a local newspaper with all the services,” Sharkey III said.

Advertising revenue began to dwindle in the 1960s, so the family sold the newspaper to former state Sen. Luther Gibson in 1963, said Sharkey III, who was managing editor at the time. Since then, the newspaper has continued to reduce its staff.

Sharkey III, who has written a column in recent years and will have penned more than 350 by the end of 2019, saw the decline from a five-day-a-week publication to the more recent twice-a-week schedule.

“I hate to see it,” said Mayor Rob Schroder, who also writes a column for the paper. “We had at least one dedicated reporter all the time, and they’ve gone away in the last five years.”

Journalism serves a watchdog role in any community, Schroder said, but in a city like Martinez the paper also acted as a conduit between residents and their local representatives. The News-Gazette was among the first outlets to report on a man who allegedly attempted a citizen’s arrest on Schroder this month, leading to a kerfuffle with the mayor and another man on Main Street.

“I think we are going to lose some connection to our community,” Schroder said. “Journalism ties us all together a little bit.”

The paper also reported last month on officials green-lighting a recreational marijuana shop near a school, infuriating two school officials.

“Who is going to get those things out to the public?” Jones asked.

Weeks after news of the paper’s demise was announced — in a corner of the front page of a November edition, a small box declared in all caps: “MARTINEZ NEWS-GAZETTE TO CLOSE” — concern has spread among loyal readers.

Gibson Publishing, which owns the paper, has not given any details on the future to staff, Jones said.

A relative of David Payne, the chief executive of Gibson Publishing and Westamerica Bancorporation, said the family would not comment on the News-Gazette.

Ramona Lappier, who’s been a reader for about 25 years, recalled yelling in her living room when she read the brief note about the shuttering. She remembered unfurling the paper over the years. Despite a typo or two that would make her and her mother laugh, the paper was still informative.

A newspaper, just like a school, is part of the fabric of a community, Lappier said.

“When those pieces are pulled out, it’s like a house of cards — what do you have left?” she wondered.

One reader, Jennifer Chan, pleaded in a letter to the editor: “Please, what can be done to save this paper?”

Jones said a few people expressed interest in purchasing the paper, but none have been successful in reaching the current owner. Jones said he has not been able to contact the owner, either.

“For the most part, there is no one covering the news in Martinez,” he said. “There is going to be a void there.”

The paper’s staff shrank in recent years, and essential staffers who left, such as an ads salesperson, were never replaced, Jones said.

“We do nothing to gain new subscribers, and we are not selling ads,” he said.

But life in Martinez will continue, even if the paper does not.

“It’s like a member of the family is going to be gone,” Sharkey III said. “After all these years, it’s suddenly not going to be there.”

Alejandro Serrano is a San Francisco Chronicle staff writer. Email: alejandro.serrano@sfchronicle.com Twitter: @serrano_alej