* Gunmaker filed complaint over export licence delay

* Heckler & Koch wants to export rifle parts to Saudi

* Berlin concerned about kingdom's human rights record

(Adds details, background)

By Alexander Huebner

FRANKFURT, June 23 (Reuters) - A German court on Thursday ordered the government to decide whether to allow gunmaker Heckler & Koch to export parts to Saudi Arabia, handing a victory to the arms manufacturer which applied for a permit more than two years ago.

Heckler & Koch, one of the world's most successful gun makers, filed a complaint last year against the government for delaying its decision on licencing the export of parts needed to manufacture its G36 assault rifle in Saudi Arabia.

Angela Merkel's government in 2008 approved the lucrative licensing deal that allows Saudi Arabia to produce the G36, despite concerns about human rights abuses in the Gulf kingdom.

The government changed its approach on arms exports two years ago following a storm of media criticism, and in January Economy Minister Sigmar Gabriel said Germany may look harder still at its arms exports to Saudi Arabia after the biggest mass execution there for decades.

Saudi Arabia executed 47 people in a single day in January, including a prominent Shi'ite Muslim cleric alongside dozens of members of the Sunni militant group al Qaeda.

Saudi Arabia has defended its human rights record, saying its legal system is based on Islam, its judiciary is independent and it denies using torture.

Frankfurt's Administrative Court ruled on Thursday that the Federal Office for Export Control (BAFA) must now decide one way or another on the Heckler & Koch case.

"It may well be that it winds up being a negative decision," Judge Rainald Gerster told the court, saying it was not the job of the court to make a political decision.

Despite Economy Minister Gabriel's pledge in 2014 to take a more cautious approach on licensing arms exports - something that unnerved the defence industry - German exports of military equipment rose to around 7.5 billion euros ($8.54 billion) in 2015, he said in February.

In the first six months of 2015, Germany permitted the export of arms worth over 178 million euros to Saudi Arabia, according to a report by the economy ministry in October 2015.

Heckler & Koch's G36 is standard issue for many armies across the globe and its HK416 assault rifle is said to have been used to kill Osama bin Laden.

($1 = 0.8783 euros)

(Writing by Caroline Copley; Editing by Madeline Chambers and Robin Pomeroy) ((Caroline.Copley@thomsonreuters.com; +49 30 2888 5214; Reuters Messaging: caroline.copley.thomsonreuters.com@reuters.net))