Foreign direct investment in China soared 18.4 percent from a year earlier in the first half, the government said Friday, suggesting confidence in the world\'s second largest economy was still strong. However, the flood of money into the economy comes as Beijing tries to staunch inflation, which is running at a three-year high. Foreign companies invested $60.89 billion in factories and other projects in China from January to June -- higher than the $51.4 billion spent in the same period last year -- commerce ministry spokesman Yao Jian told reporters. In June alone, China attracted $12.86 billion in foreign direct investment -- up 2.83 percent year on year and more than the $9.23 billion invested in May, the data showed. Analysts say robust growth in China and expectations for a stronger currency have attracted a growing number of overseas investors hoping for a better return on their money as the United States and Europe remain in the doldrums. \"In the medium to long term, China will remain the most important host country of foreign direct investment,\" Yao said. Yao said Asia has become the main source of foreign direct investment in China -- first-half investment from 10 Asian economies including Hong Kong, Japan, Malaysia and Singapore soared 23.9 percent on year to $52.5 billion. US investment fell 22.3 percent in the same period to $1.7 billion while investment from the European Union increased 1.2 percent to $3.5 billion, Yao said. He added that this was \"normal\" because total overseas investment by US and EU companies had fallen. \"China\'s foreign investment environment did not change much. We are still confident in China\'s appeal to foreign investment,\" he said. But growing concerns that the credit is helping to fuel inflation have triggered a round of monetary tightening as Beijing tries to rein in soaring consumer costs. Inflation hit a three-year high of 6.4 percent in June despite the government hiking interest rates five times since October and curbing the amount of money banks can lend.