Montreal will pay at least $24 million to bring the first all-electric car race ( formula E ) to the city, Mayor Denis Coderre revealed Tuesday.

Coderre revealed the cost for the July 29-30 race at a news conference Tuesday, but pointed out the money will benefit the city for several years to come, since part of it will pay to repave city streets in the downtown core where the circuit will run.

“We can’t have the race on streets with potholes, and these streets would have to be redone anyway,” Coderre said.

The cost for infrastructure, including paying for barricades (instead of renting them for the season) will be about $14 million, Coderre said. The city is also providing a credit line of $10 million to the non-profit organization running the event.

Coderre would not say how much the city expects to collect from ticket sales and from sponsorships. However, on Tuesday Hydro-Québec, the provincial electric utility, announced it will pay $850,000 to be the event’s main sponsor. Hydro-Québec will also outfit the race course with the electricity needed for teams to charge their cars.

“For us, it’s a great opportunity to raise our international profile,” said Hydro-Québec CEO Éric Martel, adding that 12 to 15 million people are expected to take in the event.

So far, the city is the only public government funding the race. Coderre said the provincial and federal government could make announcements in the coming months.

“We’re going for the maximum, but I can say that already there are a lot of people who want to be associated with the event,” Coderre said of sponsorships. “But it is a first race, we have to look at it like a first race.”

Coderre would not say what the city would do if the event ran a deficit.