Transit agencies and e-hail app companies could be powerful frenemies.

A new report from the TransitCenter foundation out Thursday lays a foundation for how transit agencies can join forces with emerging private transportation companies, like Uber and Lyft, to fill the gaps in mass transit networks while also allowing for greater service flexibility and innovation.

The core idea of the report, titled “Private Mobility, Public Interest,” is that municipal agencies control city infrastructure—travel lanes, parking, etc.—that private companies need to operate in. And those tech-driven, private companies have a wealth of trip data that could be used to better mass transit planning. Private companies, untethered to certain federal restrictions, can also more easily alter their services.

Each sector has something the other wants. And municipalities and fledgling private transit companies are just learning how to leverage that to complement each other and improve commutes for the riding public.

“There’s a lot of concern and confusion about these [private transit companies] and the exact roles they play,” said Zak Accuardi, a co-author of the report. “A lot of coverage that they get is their ability to ‘revolutionize’ transportation systems.”

But in reality, Accuardi said transit companies work best when they’re “reinforcing the strengths of public transportation.”

The report offers several recent examples of harmonious coexistence. This year in St. Petersburg, Florida, for example, the local transit agency teamed up with Uber and the area’s taxi service to offer subsidized rides between bus stops where service was cut.

In New York City, where the relationship between e-hails and the established taxi network is tense, there’s not much more than a begrudging acceptance of Uber’s presence. Last year, the city failed at an attempt to cap the number of drivers for Uber over congestion concerns.

“The city might have stumbled into a major clash last summer without thinking it over very well,” said Jon Orcutt, spokesman for TransitCenter.

But fences mend over time.

“Uber has been working with governments across the country to support public transportation. The TransitCenter’s report outlines a number of new and interesting ways to expand these efforts,” said Uber in a statement. “We look forward to working with them and other partners to help expand the reach of public transportation.”

As for local needs, TransitCenter believes the most pressing is fixing the MTA’s costly paratransit service, which already contracts out to private taxis, as well as livery and black car services.

“Now, there are new players that might be able to provide service more efficiently,” Orcutt said.

The MTA declined to comment on the report without the opportunity to give it a thorough review.