More than 1,500 firefighters tackled blazes which had sprung up in scrubland north of the city, injuring three people.
Homes were destroyed in the nearby town of Vitrolles and hundreds of residents were evacuated.
Fires have also been raging in mainland Portugal and on the island of Madeira.
Three people were killed on the holiday island and more than 1,000 were forced from their homes.
The French fires took hold on Wednesday afternoon and spread over more than 3,300 hectares (8,150 acres) of scrubland and wooded areas.
According to AFP news agency, three residents and four firefighters were injured, some seriously, in fires across the region.
The firefighters were hurt battling a blaze further west in Herault, when their vehicle was surrounded by flames.
Vitrolles, about 25km (15 miles) north of Marseille, was the town worst affected.
"Everything burned, the house, the car... there is nothing left," a resident of Vitrolles told BFM-TV.
Other towns affected included Pennes-Mirabeau, Saint-Victoret, Fos-sur-Mer and Rognac, where the main fire started.
Palls of thick smoke which rose from Vitrolles and Pennes-Mirabeau were drifting over Marseille on Wednesday.
Marseille airport, which redirected incoming flights to make way for firefighting aircraft, said the situation was gradually getting back to normal by midday on Thursday.
But it warned that some roads to the airport remained closed and advised travellers to use trains.
Marseille's Deputy Mayor, Julien Ruas, said firebreaks had been created to protect northern neighbourhoods.
Fires are frequent in summer in south-eastern France but it is rare for them to threaten urban areas.
On Madeira, the flames encroached on the capital Funchal and are blamed for the deaths of three elderly people whose homes caught light.
A fourth death was reported on the Portuguese mainland as wildfires raged in central regions.
Firefighters have contained wildfires in southern France which threatened the city of Marseille but remain on alert as more windy conditions are expected.