China has formally opened its first overseas military base in Djibouti with a flag raising ceremony and military parade.

More than 300 people attended Tuesday's ceremony, including deputy Chinese naval commander Tian Zhong and Djibouti's defence minister, according to state media.

The event was timed to coincide with the celebration of the 90th anniversary of the establishment of China's military, the People's Liberation Army, on August 1.

China began constructing a base in Djibouti last year. It will be used to resupply navy ships taking part in peacekeeping and humanitarian missions off the coasts of Yemen and Somalia, in particular.

Home to only around 800,000 people, Djibouti also hosts troops from US, France and Japan.

READ MORE: AU calls for calm amid Djibouti-Eritrea border tensions

Djibouti's position on the northwestern edge of the Indian Ocean has fuelled worry in India.

Officials there are concerned that China is encircling India with a string of military alliances, including Bangladesh, Myanmar and Sri Lanka.

Djibouti marks China's first overseas naval base, though Beijing officially describes it as a logistics facility.

Chinese President Xi Jinping is overseeing an ambitious military modernisation programme, including developing capabilities for China's forces to operate far from home.

In Beijing, Xi told government leaders and PLA members that the Chinese people "treasure peace and we absolutely do not engage in invasion and expansion".

"However, we have the confidence to conquer all forms of invasion," he said in a speech to mark the founding of the PLA.

Djibouti is a tiny barren nation sandwiched between Ethiopia, Eritrea and Somalia. It is at the southern entrance to the Red Sea on the route to the Suez Canal.

China's agreement with Djibouti ensures its military presence in the country up until 2026, with a contingent of up to 10,000 soldiers, according to The Diplomat magazine.

Beijing has made extensive infrastructure investments throughout the African continent as it seeks to gain access to natural resources and new markets.

Chinese banks have been major funders of at least 14 such projects in Djibouti, valued at $14.4bn in total, including a railway line that will halve transit times from Djibouti to Ethiopia's Addis Ababa.