Japan's defense budget could rise to a record of around ¥5.1 trillion ($44.64 billion) in fiscal 2017 amid security challenges from China and North Korea, a government source said.

Defense spending has been on an uptrend since fiscal 2013, when the budget was compiled after Prime Minister Shinzo Abe returned to power in December 2012. Next year could mark the fifth straight year of increases.

The government might also boost defense spending in an extra budget expected to be compiled later this month for fiscal 2016 through next March, the source said Thursday. Fiscal 2017 begins in April.

In view of China's maritime assertiveness, Japan is trying to beef up its ability to defend remote islands, especially in and around Okinawa, as well as improve its ability to intercept ballistic missiles launched from North Korea. It is also working on boosting its space and cybersecurity defenses.

Still, the envisaged increase in the budget, which covers costs related to the realignment of U.S. forces in Japan, stands in contrast with Japan's efforts to rein in spending on social welfare and education.

The 2012 defense budget compiled by the former Democratic Party of Japan, predecessor of the Democratic Party, came to ¥4.71 trillion. It topped ¥5 trillion for the first time in fiscal 2016 at ¥5.05 trillion.

Under a five-year defense program through fiscal 2018, the government expects average annual spending on defense to rise 0.8 percent.

Funds allocated for the realignment of U.S. forces are expected to rise from ¥179.4 billion for the current fiscal year, according to the source.

The funds will be used to help transfer U.S. Marines to Guam from Okinawa, where the bulk of U.S. military facilities in Japan are concentrated.

They will also be used to move U.S. carrier-borne fighter jets from the U.S. Navy's Atsugi air base in Kanagawa Prefecture to Iwakuni, Yamaguchi Prefecture.