* Gabriel loses out in SPD shake-up
* Justice, family ministers are frontrunners to replace him
* SPD has six posts in new "grand coalition" (Adds details on German foreign policy, SPD cabinet jobs)
By Madeline Chambers
BERLIN, March 8 (Reuters) - Germany's Foreign Minister Sigmar Gabriel said on Thursday he would not join Chancellor Angela Merkel's coalition government, opening the way for a new SPD figure in the high-profile post.
The move came as no surprise. Gabriel has had tense relations with Andrea Nahles, one of the SPD's new leaders along with Olaf Sholz, and he said they had told him he would not be part of the government due to be sworn in next week.
Merkel's conservatives and the Social Democrats (SPD) have agreed that the SPD will retain control of the Foreign Ministry in their "grand coalition" and the party said on Wednesday it would announce the name of the new minister on Friday.
The frontrunners are Heiko Maas, 51, justice minister in the last government, and Katarina Barley, 49, family minister since 2017. She has a strong interest in European affairs and her father is British.
Maas brought in new laws forcing social media companies like Facebook and Twitter to remove hate speech from their sites and is a vocal critic of the far-right Alternative for Germany (AfD).
The post of top diplomat is crucial as the Nazi era and World War Two recede into history and Germany gradually takes on a more assertive international role to match its economic might.
Most commentators expect Merkel to keep a firm grip on ties with the United States, Russia, China and the EU as it negotiates Brexit and euro zone reform.
The SPD's leaders are finalising plans on who to put in its six cabinet posts. It is expected to split them evenly between men and women and there is pressure to have a representative from the former Communist East.
Acting SPD leader Scholz is set to become finance minister . The other four ministries the SPD can fill are labour, justice, family and environment. Barbara Hendricks, SPD environment minister in the outgoing coalition, has said she will leave office.
Merkel's Christian Democrats and Bavarian Christian Social Union allies have already announced their choices of cabinet ministers.
Parliament is due to elect Merkel for her fourth term as chancellor of Europe's biggest economy on Wednesday, nearly six months after an election in which her conservatives and the SPD bled support to the AfD.
In his statement on Thursday, Gabriel, who has previously been economy minister and environment minister, said it had been a "big honour" to serve his party and his country.
"It was an exciting and eventful time which opened up big opportunities and experiences that went way beyond what I would dared to dream of as a younger person," he said on Facebook.
Respected by some for plain speaking and taking a clear stance, he was also seen as something of a loose cannon and known for zig-zagging on issues, including migrant policy.
Media have sometimes mocked him for his undiplomatic touch. Visiting Israel last year, he met a group critical of Israel's treatment of Palestinians, prompting Prime Minister Benjamin Netanyahu to cancel talks with him. (Reporting by Madeline Chambers; Editing by Andrea Shalal and Andrew Roche)