Fighting over a yellow cab is a long-enshrined tradition on the streets of New York City.

Who hasn’t heard arguments erupt over who got there first or who needs the cab more? As words turn into shoving matches or even fistfights, the outcome is inevitably the same: The winner rides away in the back seat, leaving the loser seething at the curb.

But instead of fighting, how about this jarring idea: sharing.

A new service gives passengers in thousands of yellow taxis the option of making space in the back seat for a stranger, in return for discounted fares. The shared rides are being offered through an unusual partnership between two competing ride-hailing apps: Via, which runs car pools in parts of Manhattan, Brooklyn and Queens, and Curb, an alternative to sticking out an arm to hail a cab.

The service is the latest effort to help the city’s troubled yellow taxi industry, which has steadily lost ground to the extraordinary growth of black cars dispatched by Uber, Lyft and other ride-hailing apps. It is intended to give New Yorkers another option for getting around at a time when the subway system has been overwhelmed by crowds and delays, and to create a more efficient transportation network with fewer cars driving around empty or clogging streets.

In doing so, it will also redirect passengers who have defected to the ride-hailing apps for convenience and cost back to the yellow cabs they left behind. Yellow cabs made an average of 332,075 trips per day in March 2017, down from 393,886 the year before, according to the city’s Taxi and Limousine Commission, which regulates the industry.