Image copyright Getty Images Image caption Israeli Prime Minister Benjamin Netanyahu and Chinese President Xi Jinping have met on a number of occasions to boost ties between the two countries

On paper Israel and China are unlikely close trading partners.

China, the world's second-largest country, is the biggest exporter on the planet. While Israel, a tiny strip of land in the Middle East, is only in 45th place on the global exporting league table.

And importantly - Israel has always been a steadfast ally of the US.

So given the current trading spat between the US and China, you would expect Israel to be firmly on the American side.

Yet what many people don't know is that Chinese investment in Israel is continuing to boom, at the same time as a growing number of Israeli firms are entering the Chinese marketplace.

Image copyright Getty Images Image caption The UK's Prince Williams was shown some examples of Israeli technology on his recent visit to the country, such as these AI glasses that help people with limited sight more easily read

So while President Trump is slapping tariffs on Chinese exports and talking tough, Israel's Benjamin Netanyahu is happily encouraging his country's firms to accept Chinese investments, as the figures show.

In 2016 China's direct investment in Israel almost tripled to $16bn (£12bn), according to a report in the South China Morning Post newspaper.

Meanwhile, the Jerusalem Post predicts that China will overtake the US as the number one source of overseas investment in Israel.

So what has brought the two countries together, and should Israeli firms be cautious?

Image copyright Getty Images Image caption Chinese firms are not just buying up Israeli firms, they are also working on Israeli construction projects, such as the Tel Aviv Metropolitan Area Mass-Transit System

Over the past two decades the Israeli economy has established itself as a leading hub of technological development.

Commentators say that Chinese firms want to get their hands on that technology, at the same time as Israeli companies want better access to the giant Chinese marketplace.

"The Chinese are leveraging Israeli tech to fuel their economy, Israel is held in high esteem as a hub of innovation," says Hagai Tal, chief executive of Taptica, an Israeli mobile advertising company.

"China is set on learning as much as it can in order to position itself as an innovation economy.

"[Meanwhile], Israeli companies also see important opportunities in the East, and the meeting point of these two approaches is what produces such successful business partnerships."

Image copyright Getty Images Image caption Israel has built a hi-tech economy over the past two decades

To help bring Israeli and Chinese companies together, a number of business events are now held every year, such as Silicon Dragon Israel, which took place in Tel Aviv at the start of the year, and the China-Israel Innovation Summit, which was held earlier this month in Guangdong.

Rebecca Fannin, a founder of Silicon Dragon Israel, says Israeli tech start-ups that have secured Chinese investment tell her they "are progressing faster with Chinese capital, and through introductions, collaborations, and easier access to the large China mainland markets".

In recent years Israeli firms that have either been bought outright by Chinese companies, or sold them share of their business, include medical lasers operation Alma Lasers, and medical devices group Lumenis. Others are Israeli dairy business Tnuva, image recognition firm Cortica, and gesture control group Extreme Reality.

Royi Benyossef, an Israel-based manager at investment fund Samsung Next, says that the Chinese are "mesmerized by Israel and its technology exporting capabilities".

Other commentators say that the different national characteristics of the two countries complement each other.

Peggy Mizrahi, a Chinese citizen who lives in Israel, says: "The Chinese are known for long-term planning, and being conservative and hierarchical, unlike the commonly recognised Israeli mindset of [being] fast, innovative, flexible, and having a lack of respect for authority."

Daniel Galily, an Israeli expat who has lectured in business at Beijing Geely University, adds that: "The educational system in China places great emphasis on discipline and obedience to superiors, while the Israeli educational system and the Israeli army encourage students and soldiers to think about new ideas, and to solve problems in situations of uncertainty.

"The Chinese understand that, and so they strive to integrate the Israeli creativity into their economy."

Image copyright Getty Images Image caption Former Israeli Prime Minister Ehud Olmert also worked to establish closer trade and business ties between Israel and China

However, it is not just Chinese firms that are benefiting from closer trade ties between the two countries.

Spotad, an Israeli digital advertising firm, entered the Chinese market last year after securing funding from a Hong Kong-based private equity firm.

The company now works with all the major Chinese online advertising exchanges.

Other Israeli firms that are continuing to make inroads into the Chinese market include mobile marketing firm AppsFlyer, and diamond trading platform Carats.

Global Trade

More from the BBC's series taking an international perspective on trade:

Yet while both Chinese and Israeli firms seem pleased with their continuing cooperation, some commentators are anxious.

"One of the biggest drawbacks that I see here for Israel is that China is notorious for not respecting the intellectual property laws of other nations, so Israel has to be very careful about what kind of manufacturing they outsource to China," says Jason McNew, founder and boss of Pennsylvania-based Stronghold Cyber Security.

Image copyright Getty Images Image caption Some analysts fear that Israeli technology could end up being used by Chinese troops, such as these two soldiers, pictured on a training exercise

Lee Branstetter, professor of economics and public policy at Carnegie Mellon University's Heinz College, says that the concern in the US is that Israeli technology could ultimately find its way into the hands of the Chinese military.

"The Pentagon is increasingly worried that artificial intelligence capabilities acquired by Chinese firms through civilian investments or licensing deals could find their way into a new generation of Chinese weapons that would threaten American troops and American allies.

"The Pentagon is also worried that Israel could become a back door through which China could acquire capabilities that it could not get in the US due to regulatory scrutiny.

"I suspect that this will place some limits on the extent and magnitude of the emerging Israel-China relationship. If an American pilot were ever shot down by a Chinese missile powered by Israeli technology, it would be a real problem for the Israeli government."

The Israeli government declined to comment on these security and defence sector issues.