BlaBlaCar has made a radical departure from its traditional carpooling business by buying Ouibus, a bus service that was operated by France’s national railway company SNCF.

As part of the deal to acquire Ouibus, SNCF and group of previous investors are backing BlaBlaCar with $114 million. While the deal lets BlaBlaCar expand behind its carpooling platform, it also comes with big risks as the company will now own and operate a fleet of buses that operate across 300 cities across Europe.

“We are excited to consider joining forces with the OuiBus team to enable travellers to find diverse mobility solutions on BlaBlaCar that suit their range of needs,” said Nicolas Brusson, cofounder and CEO of BlaBlaCar, in a statement. “This project supports our ambition to grow a broad mobility offer across Europe, combining cars and buses. The collaboration with SNCF would also be a promising turning point in the development of intermodal and door-to-door mobility, a common ambition which we are uniquely positioned to deliver together.”

Founded over a decade ago, BlaBlaCar remains one of France’s most closely watched startups, having raised more than $300 million and achieved unicorn status. The company has gotten there by building a carpooling platform that connects drivers making trips between cities with riders. BlaBlaCar says it now has 65 million members in 22 countries.

But with big expectations and big fundraising comes a need to keep finding new ways to grow. The Ouibus deal comes as a rather surprising answer to that dilemma.

Over the past three years, Ouibus, which was operated by the state-owned SNCF, has carried more than 12 million passengers. In the press release, BlaBlaCar says the combination will allow it to “optimize vehicle occupancy rates for buses and cars, and offer a convenient door-to-door solution for travellers.”

BlaBlaCar also says the deal will open Ouibus to working with other bus services across Europe. That would seem to put it even more directly in competition with Munich-based Flixbus, a data-driven bus company that works with partners who actually operate, own, and service the buses. Likewise, Flixbus has launched a competitive rail service in Germany, as such networks are being privatized across Europe.

Such privatization has been the source of controversy in France, where railway reforms designed to prepare SNCF for competition led to three months of crippling strikes last summer.

“We are convinced that to offer more trains, we need to offer more than trains,” said Guillaume Pepy, president of SNCF, in a statement. “We need to be able to offer our travellers the possibility to go from departure point to destination, by combining sustainable modes of transport with a railway backbone. This joint project aims to make our customers’ journeys easier, and reduce the single occupancy of cars on the road.”