The ban is part of a plan to slash greenhouse gas emissions by 50 percent by 2020 compared to 1990 levels.

The city is also planning to divest fossil fuels from their pension funds, which would be a first for a capital city and all the more groundbreaking given that Norway is an oil-producing-nation.

Also included in the plans are more bicycle lanes, subsidising the purchase of electric bicycles and reducing automobile traffic over the city as a whole by 20 percent by 2019 and 30 percent by 2030.

"In 2030, there will still be people driving cars but they must be zero-emissions," Lan Marie Nguyen Berg, a member of the Green Party, told a news conference.

The city's plans were welcomed by environmentalists.

"We are very happy to see that, some weeks ahead of the (UN climate) summit in Paris, the new Oslo municipal council is taking a courageous decision and becoming the first capital in the world to choose to pull out of fossil fuels," said Arild Hermstad, head of Norwegian NGO The Future in Our Hands.

"It's a strong symbol when the capital of an oil-producing nation says it won't invest in fossil fuels," he added.

Norwegian media said the largely ceremonial post of city mayor would go to Marianne Borgen of the Socialist Left and not Shoaib Sultan, the Green Party candidate who was hoping to become one of the first Muslims to lead a major European city.