Facebook and Google have been brutal to the news business. But this primarily reflects a failure of imagination. The tech giants are the world’s best distribution platforms and could be an answer for journalism instead of a grave threat.

As readers have shifted to digital sources, the two companies have taken a large majority of online advertising revenue. More important, the platforms now act as “regulators” of the news business — determining what information gets delivered to whom, and when. With the flick of an algorithmic finger, those two companies decide what news you see and whether a publisher lives or dies.

The impact on journalism has been clear. Since the start of the year, we have seen over 1,000 planned layoffs at Gannett, BuzzFeed and HuffPost, and no one thinks we are anywhere near the end. Facebook and Google’s answer so far has been to pledge to spend $300 million each over the next three years to help journalism. But that money will be dribbled across a huge news landscape, and much of it will undoubtedly be used to encourage further use of Facebook and Google products.

But such investments amount to charity, and charity will never be the answer. What news publishers really need are active partners who are willing to embrace the idea that quality journalism sustains our civic society and that the answer to bad information is more good information.

We can start with the fact that “free” isn’t a good business model for quality journalism. Facebook and Google flatly refuse to pay for news even though they license many other types of content. Both companies have deals to pay music publishers when copyrighted songs play on their platforms. And the companies also aggressively bid to stream live sports and entertainment content to run on Facebook Watch and YouTube. These deals are varied and often secret, but none of them are based on “free.” Why are the platforms so unwilling to pay news publishers for access to the quality journalism that users need and value?

There’s no reason those who produce the news shouldn’t enjoy the same intellectual property protections as songwriters and producers (regulators in Europe are looking at replicating some of these safeguards for journalism).

The tech giants are also run as “walled gardens” that minimize brands and separate publishers from their readers — even while hoarding information about those same readers. Imagine trying to build a trusted relationship with an audience when you can’t even know who they are. Publishers need new economic terms that include more revenue and more information about our readers. Any minor costs to these companies would pay huge dividends not only for our society but also for their credibility with Congress and policymakers around the world.

Facebook and Google also need to be willing to acknowledge investments in quality journalism through their algorithms. They are constantly on the defensive about spreading false and misleading “news” that hurts people. They could start to address the problem by simply recognizing that The Miami Herald is a much better news source than Russian bots or Macedonian teenagers — and highlighting original, quality content accordingly. Recognizing and promoting publishers that have consistently delivered quality news content can’t be that difficult for sophisticated tech companies. And there are a range of qualified independent ratings organizations, such as NewsGuard, that could help them separate the wheat from the chaff.

Whether they like to admit it or not, Facebook and Google are at real risk when it comes to the news business. Under the adage “You break it, you buy it,” the platforms now own what happens when quality journalism goes away. A study by the University of North Carolina’s School of Media and Journalism found that more than 1,300 American communities have completely lost sources of local news.

David Simon, a former newspaper journalist who became a TV writer, lamented the loss of local coverage and said in an interview with The Guardian: “Oh, to be a state or local official in America over the next 10 to 15 years, before somebody figures out the business model. To gambol freely across the wastelands of an American city, as a local politician! It’s got to be one of the great dreams in the history of American corruption.”

Facebook and Google could address these risks by embracing responsibilities and becoming partners, rather than minor benefactors, for journalism. They need to come to the table with a real deal on revenue, data and algorithms.

Jonah Peretti of BuzzFeed has talked about digital publishers merging to gain more negotiating leverage over the tech platforms on these issues. Legislation sponsored by Representative David Cicilline, a Rhode Island Democrat, would allow news publishers to collectively negotiate with the two companies without violating antitrust rules.

Facebook and Google talk incessantly about how they are improving the world. Why not do something genuinely good for all of us and support journalism instead of destroying it? And it wouldn’t even have to be that hard. There is plenty of money and quality content to go around. All it would take is a little enlightened self-interest and a real commitment to the continued existence of quality news.

David Chavern is president and C.E.O. of the News Media Alliance, a trade association representing some 2,000 news publishers in the United States and Canada.