By Ben Blanchard

BEIJING (Reuters) - China on Thursday offered loans to Djibouti, the site of its first overseas military base, as the Horn of Africa state's leader told President Xi Jinping he considered himself a great friend of the Asian giant.

With a population of less than one million, Djibouti has long punched above its weight, thanks to a strategic location on the Gulf of Aden, one of the world's busiest shipping routes linking Europe to Asia and the Middle East.

China formally opened the base, which it calls a logistics facility, on Aug. 1, the 90th birthday of the People's Liberation Army. Djibouti also hosts large U.S. and French bases.

Djibouti was politically stable, Xi told its president, Ismail Omar Guelleh, at a meeting in Beijing's Great Hall of the People.

"China sets great store by its relations with Djibouti," he added.

Guelleh, who has been in power since 1999, said he considered himself a "great friend of China's" and could not count the number of times he had visited.

"Djibouti is known for being a country of peace, exchanges and meetings," Guelleh said.

"I would like to recall the geostrategic position of Djibouti and its importance in this part of the world as an island of stability for Asia, Africa and the Middle East."

The two, who did not mention the military base in comments to reporters, later oversaw the signing of a framework pact for preferential loans.

Chinese Assistant Foreign Minister Chen Xiaodong declined to reveal the amount of loans offered, saying he could not remember.

"In this area both countries have always had good cooperation," Chen told reporters.

Xi and Guelleh did discuss the military base, Chen added.

"What I want to stress is that China building a logistics base in Djibouti benefits China to even better fulfill its naval protection, peace-keeping, disaster relief and other international work," he said.

The base will be used to resupply navy ships participating in peacekeeping, humanitarian and anti-piracy missions off the coasts of Yemen and Somalia, in particular.

China also has deep economic interests in Djibouti.

Last week, China's POLY-GCL Petroleum Group Holdings Ltd signed a memorandum of understanding to invest $4 billion in a natural gas project in Djibouti.

In January, the government launched construction of a project billed as Africa's largest free trade zone, as part of China's massive Belt and Road infrastructure initiative stretching to Asia, Europe and beyond.

(Additional reporting by Martin Pollard; Editing by Clarence Fernandez)