PARIS (AFP) - It was a victory to savour.
As she bid to become the first female mayor of Paris, Spanish-born Socialist Anne Hidalgo had to endure taunts from her opponents about her modest origins and lack of Parisian roots.
But in the end, voters in the French capital brushed such snobbery aside and defied the national trend by electing the 54-year-old by a convincing margin.
Ms Hidalgo had been expected to be run extremely close by her centre-right rival, glamorous former minister Nathalie Kosciusko-Morizet, on a night when the Socialists took a beating from voters across the country because of the unpopularity of President Francois Hollande's government.
But Ms Hidalgo emerged with nearly 55 percent of second-round votes in the capital, comfortably seeing off Kosciusko-Morizet's challenge.
An old school feminist socialist, Ms Hidalgo has spent the last 13 years as a low-profile deputy to current mayor Bertrand Delanoe.
Her party aparatchik image was seen as an electoral handicap but her serious manner and promises to boost social housing and childcare provision within the city centre appear to have struck a cord with the capital's residents in these tough economic times.
"Mine was a victory for authenticity, a victory for a a left loyal to its principles and effective at implementing them," Ms Hidalgo said after securing membership of the exclusive club of women who have taken charge of major cities around the world.
Members currently in office include Ana Botella, the mayor of Madrid, Cape Town's Patricia de Lille and Carolina Toha, who runs Santiago, Chile.
Born near Cadiz in the southwestern corner of Spain in 1959, ms Hidalgo moved to France as an infant and grew up in a working class suburb of Lyon.
As a child, she spoke Spanish to her parents and French to her sister. She became a French national at the age of 14, dropping her native Christian name Ana in favour of the more traditionally French Anne.
She has been known to approvingly quote the words of writer Sacha Guitry: "Being a Parisian is not about being born in Paris, it is about being reborn there."
After working as a works inspector, Ms Hidalgo became an advisor to former Labour minister Martine Aubry, the architect of France's 35-hour working week.
But she was a relatively late entrant to the Socialist Party, only signing up in her mid-30s when the party was under the leadership of Lionel Jospin - a leader who had a similar unflashy style and reputation for integrity.
After Hollande was elected president in 2012, Ms Hidalgo was widely tipped for promotion to ministerial office. She opted instead to remain at City Hall and wait for the opportunity to take over from Delanoe.
Her rival Kosciusko-Morizet did herself no favours by characterising their battle as one between "between the star and the caretaker" - a remark that was seen as a catty reference to Ms Hidalgo's Iberian heritage (the concierges of Paris apartment buildings having, until recently, often been immigrants from Spain and Portugal).
Ms Hidalgo hit back by accusing NKM of being part of a privileged "caste" cut off from the real world, and it was a label that stuck to the centre-right candidate.
From a wealthy establishment family, NKM was widely lampooned for describing the Paris metro as a "charming place" - to the disbelief of harassed rush-hour commuters.
The battle also focused on sharply contrasting approaches to the city's financing, with NKM having pledged to cut the number of public sector workers to liberate funds for plans to enhance the city centre's status as the world's favourite tourist destination.
Ms Hidalgo has promised major investment in housing, transport and green spaces, with the aim of reversing a middle and working class exodus to the suburbs.
She has promised to create 10,000 new social housing units and 5,000 kindergarten places.
Her administration will also have a distinctly Green tint to it as a result of a deal she did after the first round. Under the pact, the Greens are expected to double their representation on the council that oversees the mayor's work and take around one fifth of the deputy mayor posts on the city's executive.