China is building its second aircraft carrier, the defence ministry said Thursday, as Beijing expands its naval capabilities amid maritime disputes with neighbours in the East and South China Seas.

"This aircraft carrier is being developed according to entirely domestic designs," defence ministry spokesman Yang Yujun told a regular briefing, adding it was under construction in Dalian, a northeastern port.

The official confirmation comes after months of rumours and hints from military officials.

Beijing has rapidly expanded its military in recent years, rattling its neighbours and attracting the attention of the United States, which is making a foreign policy "pivot" towards Asia.

China's first aircraft carrier, the Liaoning, is a secondhand Soviet ship built more than 25 years ago. It was commissioned in 2012 after extensive refits.

"The design and construction of the second aircraft absorbed the useful experience of research and training from the Liaoning," Yang said.

"This led to many areas of improvements and enhancements," he added, without providing details.

The new vessel will have a displacement of 50,000 tonnes and use "conventional power", Yang said, as opposed to being nuclear-driven.

It will carry China's indigenous J-15 aircraft along with other planes, he added.

Reactions on social media to the announcement were overwhelming positive and nationalistic.

"This is a very good New Year's gift for the motherland!" wrote one user on Sina Weibo, a Chinese version of Twitter.

Others warned that having just two such ships was not enough to counter the naval power of China's rivals.

"Once we have equipped each of our fleets with aircraft carriers, the US and Japan will wake up from their dream," another user wrote.

- Blue water -

Beijing's forces have been involved in sometimes tense confrontations with Japanese and Philippine units over maritime disputes in the East China Sea and South China Sea respectively, prompting fears that the disputes could result in armed clashes.

Story continues

Relations between Japan and China have often been strained over competing claims of the Senkaku islands, or Diaoyu in Chinese. Japan regularly scrambled fighter jets in response to Chinese planes, it says. The US and Japan have mutual defence treaty and any conflict with China could draw both countries in.

"In terms of China's capacity to require other Asian countries, excepting Japan and India, to accept Chinese naval superiority, having the new carrier would be valuable," Steve Tsang, a Chinese studies professor at the University of Nottingham, told AFP.

But he added that the Chinese navy was "already superior" to many of its neighbours, and this would only add to China's lead.

Beijing claims almost all the strategically vital South China Sea, even waters close to the coasts of other states, and has turned a series of reefs and outcrops in disputed waters into artificial islands capable of hosting military facilities.

In recent months, US ships and planes have approached the new islands to assert international rights to freedom of navigation, with a B-52 bomber on one occasion unintentionally flying within two nautical miles of one of them.

"International seas and airspace belong to everyone and are not the dominion of any single nation," US Admiral Harry Harris said at the Stanford Center at Peking University last month.

"Our military will continue to fly, sail, and operate whenever and wherever international law allows. The South China Sea is not -- and will not -- be an exception," he added, according to a transcript.

Beijing is seeking to build a "blue water" navy capable of operating in distant seas and has embarked on an extensive project to modernise its two million-strong military, the world's largest.

China legalised overseas counter-terror operations by its military this week as part of a controversial new law, which stated that Beijing "may send personnel outside the border to carry out anti-terror activities" when the "relevant country" agrees.

The measure applies to the People's Liberation Army, which includes the navy, as well as the People's Armed Police and employees of the country's public security organs.