STOCKHOLM, Nov 4 (Reuters) - Finance Minister Magdalena Andersson moved a step closer to becoming Sweden's first woman prime minister on Thursday when the ruling Social Democrat party elected her as its leader in place of Stefan Lofven.

Lofven, the current prime minister, wants to step down before national elections due in September 2022.

His minority coalition with the Green Party has struggled to survive since coming to power in 2014 and Andersson would need backing from the Greens as well as the Left and Centre parties to also succeed Lofven as leader of the country.

Neighbouring Norway got its first female leader 40 years ago. Sweden's failure to follow suit has grated in a country that prides itself on leading the world in gender equality and has a self-described "feminist" foreign policy.

If appointed, Andersson will face tough budget negotiations this year and need to reverse a deficit in the opinion polls if she is to extend her premiership beyond next September.

She said her priorities would be reducing the role of the private sector in education, health and elderly care, addressing climate change and tackling Sweden's wave of gang crime.

"With all the problems we have had, it is clear to people that we need to do more together," she told reporters.

The 54-year-old will become prime minister if a majority in parliament does not reject her in a confirmation vote, probably this month.

Support from the Centre and Left parties is not a given, however.

The Centre Party wants changes to rules over forestry rights and building regulations in exchange for its support. Those policies are opposed by the Greens.

The Left wants a say in policy while the Centre Party wants them excluded.

A vote against Andersson could lead to a snap election or to Moderate Party leader Ulf Kristersson becoming prime minister.

His centre-right bloc is backed by the Sweden Democrats, a populist, anti-immigration party that the Greens, Left and Centre want to prevent from having a say in government policy.