PHILADELPHIA — In cities around the world, the ride-for-hire company Uber repeatedly has clashed with regulators as it seeks to expand. This was one of those cities until a few weeks ago. But as tens of thousands of delegates, donors, protesters and members of the media descended on the city for this week’s Democratic convention, Uber tried a different approach: a partnership with regulators to help get people around and relieve congestion.

The company and its smaller competitor Lyft say the partnership worked: They have achieved record ridership in the city, a week after they said they did the same in Cleveland. (Neither company has released rider numbers, though Jon Feldman, general manager of Uber Pennsylvania, said its ridership through Wednesday afternoon was up more than 60 percent from a week earlier. Lyft spokesman Adrian Durbin said Thursday his company’s ridership in the city also was up by 60 percent.)

The records Uber and Lyft are touting have been hard-won, expensive and occasionally bumpy. To reach the truce, Uber paid $350,000 into a trust to settle charges by the Philadelphia Parking Authority that the company had been operating in the city without regulation. To meet demand this week, both companies offered some drivers guaranteed minimum pay at peak times — $21 to $27 an hour for Uber after drivers in Cleveland complained of low earnings, $20 for Lyft — and neither company would say if they’re turning a profit. Riders had to wait an hour or more for an Uber from the convention on Monday night. And road disruptions have made the companies’ sometimes optimistic wait-time estimates particularly unreliable.

The conventions were a test for the ride-sharing companies, which have long argued they can act as a complement to existing transit options, helping to ease pressure on clogged roads and subway systems during busy periods, including with their ride-pooling options. The events should have played to the companies’ strengths: Many convention visitors were unfamiliar with the cities’ transportation systems and accustomed to using the Uber or Lyft app whenever they need to get somewhere and don’t have a car of their own. And many here were sleeping far from the convention at Wells Fargo Center. Adding to the stakes: an unexpected cut in train service that hit just before delegates began arriving in Philadelphia.

Uber, by far the biggest U.S. ride-sharing-app company, invested heavily to make a good impression on conventiongoers and organizers. It erected a 3,200-square-foot air-conditioned lounge near the convention site offering free water, coffee, snacks, phone chargers and Wi-Fi — and reserved a parking lot exclusive to its drivers thanks to a deal with the Democratic National Committee. Uber also is spending at least $2.5 million in rider discounts and driver incentives through Labor Day in the city, hoping to convince Pennsylvania’s state legislature to pass a law that would authorize the company to operate in Philadelphia past the end of the temporary deal on Sept. 30.

Still, it wasn’t all smooth riding. The scene at 30th Street Station on Wednesday morning showed both the opportunities for Uber and the challenges it faces in taking advantage of them. Uber had set up a dedicated pickup spot on the 30th Street side of the station, and dispatched a young woman in an Uber shirt to help direct customers. Nonetheless, the line for taxis averaged about 50 people, doubled back on itself. Several people in line said they’d tried to get an Uber but decided on a cab when they saw the line move quickly. A man who gave his name as A.J. said he saw a three-minute wait for an Uber, waited 10 minutes, then canceled the ride and headed to the back of the taxi line.

On Wednesday afternoon, the Lyft app told me that “Frank” would pick me up in a minute. More than 10 minutes later, he arrived, frustrated at the police escort for cars carrying people he called “high rollers.” Frank Gregory, 58, said he’d been trying to avoid convention-related pickups this week — though he couldn’t choose where riders wanted to be dropped off — and he was headed out of Center City when he got my ride request. “I’m not chasing no ride for no convention,” Gregory said. “I stay away. I don’t want no part of it.” He’d nonetheless benefited from the bump in demand this week, netting about $300 on Monday and again on Tuesday in 10- or 11-hour shifts. I was one of the last rides of the week for Gregory, who’d been working since 5 a.m. and was planning to end his shift soon to get out of town and go fishing.

Ronald Blount, president of the Unified Taxi Workers Alliance of Pennsylvania, called Uber’s deal with the city earlier this month “the nail in the coffin” for his industry. But Jessica Smith, a dispatcher for All City Taxi, said by telephone Thursday that there was plenty of business to go around and that drivers dispatched by the company were busier than usual this week. “We really don’t have any complaints from our steady customers,” she said. “Ubers haven’t been a threat to us.” On the company’s Yelp page, 11 of the 97 reviews mention Uber or Lyft, with nine of them suggesting the upstarts are a better alternative.

Felipe Hernandez, 39, who started driving for Uber just a month ago, was staying on the road an extra three hours each day this week. “This is the future of taxi transportation,” he said. “Whoever stays in business has got to come this way.”

Read more:

Is Uber Making NYC Rush-Hour Traffic Worse?