PHILADELPHIA — Uber has struck a deal with Philadelphia to operate legally in the city during the Democratic National Convention and through the summer.

The agreement announced Thursday with Uber was prompted by a major disruption in regional rail service. The Southeastern Pennsylvania Transportation Authority took a third of its regional rail car fleet out of service this weekend because of structural defects.

The ride-hailing company has agreed to settle its legal disputes with the Philadelphia Parking Authority, which regulates taxis, for $350,000. Uber, which has operated in the city since 2012 without the required approval, will pay the money once the state legislature passes regulatory legislation. It still faces fines by state regulators.

PPA Executive Director Vince Fenerty said the authority agreed to “stand down for a three-month period on enforcement” to attract Uber drivers to Philadelphia without fear of impoundment. The agreement also comes as a bill to place the services under PPA regulation sits with state lawmakers.

Fenerty said authority and company officials agreed to the “probationary period” because they expected the legislation to pass in June.

“Sometimes there’s a need for people to come together and make an exception,” he said.

Jon Feldman, Uber’s general manager for Pennsylvania, said the “landmark agreement” with the city means none of the company’s services, including uberX, uberXL and uberPOOL, will face legal action through Sept. 30.

Lyft, a company similar to Uber, was not part of the agreement, but Fenerty said PPA is in “a continuing dialogue” with the company.

Uber is already offering a 40 percent discount to suburban riders who travel to and from certain transit stops.

It is not known when SEPTA will be able to get its defective rail coaches repaired and back in service. SEPTA officials did not have additional information Thursday on a potential timeline for repairs.

As Democratic leaders, conventiongoers and tens of thousands of protesters move into the city for the July 25-28 convention, the Uber riders could experiences surge prices. Uber officials say it’s impossible to predict what those prices may be, as they’re calculated through an algorithm based on real-time rider and driver demand.

Supporters of traditional taxi companies have criticized the app-driven ride-hailing services, saying they take business away from the city-regulated taxi model. Fenerty, though, said he does not expect the taxi commission to strike during the convention because it is an opportunity for all drivers to see increased business.