The City of Richmond, California has given Chevron approval to finish a $1 billion upgrade at its Northern California refinery that’s been planned for almost a decade, after agreeing to spend $90 million on community programs.

The city said Chevron must meet several conditions imposed by the city’s planning commission while installing a new hydrogen plant at its Richmond complex, including limits on sulfur processing and emissions. The world’s third-largest energy company by market value agreed to spend $90 million on city initiatives, including Internet access  for residents and scholarships.

Chevron appealed to the council after the planning commission attached its own conditions to the project, which will allow the refinery to run a slate of higher-sulfur crudes. The city and the company later agreed to a modified set of requirements. The company gained permission for a larger project in 2008 and was halfway finished when a judge reversed the city’s decision, saying its environmental assessment was flawed.

“We’re pleased with the City Council’s decision to approve the Modernization Project so we can get to work on making this refinery newer, safer and cleaner and putting 1,000 people back to work,” Melissa Ritchie, a Chevron spokeswoman at the refinery, told Bloomberg News by e-mail.

The city approved permits for an “environmentally superior” version of the project that limits Chevron to processing 750 long tons a day of sulfur, down from the 900 the company had requested. The panel also prohibited an increase in greenhouse-gas emissions and said the company couldn’t import oil by rail unless it applies for additional permits from the city.

Groups including Communities for a Better Environment in Oakland had said the project would allow the refinery to run more carbon-intensive crudes and increase emissions. Opposition increased after a crude unit fire in August 2012, California's  worst refinery blaze in a decade.

Federal and state investigators have said the line that ruptured, igniting the fire, appeared to have corroded after being exposed to sulfur compounds at high temperatures.

The San Ramon, California-based company said in April that the revamp may be finished as soon as mid-2016 should it receive approval this month. The Richmond plant can process 245,271 barrels a day, data compiled by Bloomberg show.