(Bloomberg)—Pinellas Park, Florida, isn't the kind of place where you'd expect to gain insight about the future of mass transit. The suburb of Tampa is as car-crazy as your average stretch of Floridian sprawl—the local landmarks include the Tampa Bay Automobile Museum and a drag racing strip—and anyone who can avoid the bus does. But recently the agency responsible for the area's public transportation began a novel experiment: It stopped running two bus lines and started paying for a portion of Uber rides instead.

In Uber's early days, it said it wanted to be "everyone's private driver." Now the company and its main U.S. competitor, Lyft, are playing around with the idea of becoming the bus driver, too. Uber has partnered with a handful of local public transportation agencies to strike deals like the one in Pinellas Park, which it expanded earlier this month. Later this month Lyft plans to launch a partnership with Centennial, Colorado, its first deal where a local government will subsidize its rides. The company also said it has helped a dozen transit agencies apply for federal grants that would pay for a portion of Lyft fares in situations where its drivers would effectively become part of the public transportation system.

Each of the current projects is tiny, but they could eventually be combined into something big, said Emily Castor, director of transportation policy at Lyft. "This is an area that has the potential to be a very significant part of Lyft's work in the future," she said. "How quickly will it progress from small pilots to being institutionalized in transit agencies? I think that's harder to predict."

Over the past several years, ride-hailing companies and local government officials have often had an uneasy, sometimes outright hostile relationship over regulation. The public transportation deals have been an oasis of rapprochement between them. In part, the ride-hailing deals are too small to seem threatening, according to Kyle Shelton, a program manager at the Kinder Institute for Urban Research at Rice University. "It may affect some routes; it may affect service overall; but it's not going to replace the main lines that carry thousands of riders per day," he said.

Governments already pay for taxis in some situations, but the deals with Uber and Lyft could usher in more fundamental change, and with it, tensions. What happens to people without smartphones? How do Uber and Lyft serve disabled riders? What happens if the cities come to rely on the apps, only to have the private companies decide the partnerships are no longer a sensible business venture for them? And do public governments want to encourage the replacement of public sector jobs with the contract work that defines the sharing economy?

It quickly became apparent that in areas with few riders, paying for part of a private ride was cheaper than running a bus.

As officials grapple with those questions, it's hard to ignore the real savings for governments—and real revenue for Uber and Lyft. In 2014, Americans spent $15 billion in fares on public transportation at the 850 public transit agencies that share data with the Federal Transit Administration. The operating expenses at those agencies was $42 billion. Much of the remaining 65 percent of the cost of running the systems came from public subsidies.

Suburban areas with less density and lower ridership are particularly expensive to run, making ride-hailing an attractive alternative, said Adie Tomer, a fellow at Brookings Institution's Metropolitan Policy Program. "If they can provide better outcomes for your population and do it at either the same cost if not lower, that's a win-win for society," he said. "This could start spiraling very fast."

In late 2014, Pinellas County voters rejected a referendum that would have increased local taxes to fund more bus lines and a light rail system. The Pinellas Suncoast Transit Authority would have to cut back. It drew up plans to cut off the least popular of its four dozen bus lines.

Residents in Pinellas Park, a relatively dense working-class area, and East Lake, a richer area that had a publicly run van service, complained they'd be stranded. So the transportation agency decided to share the cost of Uber rides for anyone traveling those two routes. Earlier this year it started a pilot program where people received a 50 percent discount for rides, with a maximum subsidy per ride of $3, to help riders connect to the transit system.

It quickly became apparent that in areas with few riders, paying for part of a private ride was cheaper than running a bus. The program will cost $40,000 a year, or about a quarter the cost of the two bus lines it replaced, according to the PSTA. The PSTA declined to give statistics about its ridership, other than to describe it as a success. On Aug. 1, the agency began offering subsidies for all rides in the county that end at about 20 designated transit stops. "It's not supposed to be something you'd take instead of the bus; it's supposed to be something you'd take to the bus," said Ashlie Handy, a spokeswoman for the agency. On the same day it expanded the initial program, PSTA launched a separate one to give free Uber rides to low-income residents traveling after 9 p.m., when buses don't run.

Molly Spaeth, a spokeswoman for Uber, said the company was pleased with the response to the project and would continue to look for ways to work with transit agencies.

Officials in Centennial, a suburb of Denver, will launch a similar partnership with Lyft later this month, marking the first time a government will pay for Lyft rides using public funds. Through the program, Centennial will pay for Lyft rides to and from a regional rail stop from an area that has previously only been covered by a shuttle bus. The existing service costs the city about $20 per ride, according to Cathy Noon, Centennial's mayor, far more than what it will have to pay for Lyft rides. The city projects it will handle 280 rides per day, or about six times as many rides as it currently handles through the bus service. Bloomberg Philanthropies, the charitable group founded by Bloomberg LP founder and majority owner Michael Bloomberg, gave Centennial a grant in 2014 to work on urban innovation.

Around the same time that Pinellas County launched its pilot, nearby Altamonte Springs, Florida, a suburb of Orlando, began paying for 20 percent of any Uber ride within city limits. For rides that ended at regional rail stations, the rate was 25 percent. City officials said Uber keeps them from sharing ridership numbers but that the program has grown quickly. They're working to expand to several neighboring towns soon.

In July, Miami-Dade County, Florida, applied for a $3.5 million federal grant to improve public transportation, $575,000 of which it plans to use to subsidize Uber and Lyft rides to two train stations, hoping that doing so will increase ridership at those stations by 5 percent. "Ride-sharing companies will mature in the Miami-Dade market but are unlikely to serve low-ridership and low-income neighborhoods without public subsidy," the county said in its application. It is also working to incorporate ride-hailing into its own mobile ticketing application.

Miami-Dade's cooperation with ride-hailing companies coincided with the end of a years-long fight with them over whether to allow Uber and Lyft to operate. Until a few months ago, Uber and Lyft were against the law, and the city handed out violations to drivers as they picked up fares. Carlos Cruz-Casas, assistant director of the Miami-Dade County Department of Transportation and Public Works, said it was odd to plan the area's future around ride-hailing while also debating whether ride-hailing should be legal at all. "It was a friendly relationship," he said. "They were being fined, but at the same time, we'd say, let's work together."

Issues of control are going to test these friendships, said Shelton and Tomer. Local governments are eager for data about ridership that they can use to reconfigure services, and Uber and Lyft tend to see information about demand as trade secrets. If ride-hailing does drive down car ownership, as both Uber and Lyft expect it will, that could increase demand for subsidized rides, leaving governments holding the tab for new forms of semi-public transit.

Bridj, a startup that runs private bus service in some cities, is proposing a model that would leave more control with the governments. It has no set lines and instead responds to requests made on its app.

Earlier this year, Kansas City Area Transportation Authority agreed to buy 10 vehicles from Bridj, staff them with drivers, and set and collect fares. Unlike the ride-hailing partnerships, which are largely designed to get people to another form of transit, the Bridj program aims to drop people off where they're actually trying to go. Instead of sharing in fares, Bridj takes a service fee for the use of the technology that accepts ride requests and directs the vehicles on ever-changing routes.

The Kansas City government gets to keep more control, and Matthew George, Bridj's chief executive officer, said about three dozen cities have inquired about partnerships since the Kansas City pilot started. The company plans to announce at least four partnerships before the end of the year. George thinks private, on-demand bus lines will prove to be more cost-effective than ride-hailing services that use smaller vehicles because they can move more people at once.

George also criticizes Lyft's and Uber's spotty track records of cooperation with local governments and points out that unlike at those companies, Bridj's drivers in Kansas City are all union members hired by the transit authority. "On the one end of the spectrum you have the very traditional mode that we've done for 100 years, and on the other one, you have this Ayn Randian free market free-for-all that doesn't have basic protections in place for the people who are most vulnerable," he said. "We've shown that there's something in the middle."