Japan said Thursday it may withdraw its military airlift mission in Iraq by the end of the year in light of security improvements there and a growing focus on Afghanistan.

The move would end Japan's military involvement in Iraq — a non-combat mission that has tested the limits of its pacifist constitution and divided a war-wary public.

Japanese officials said the withdrawal plan was still being negotiated in conjunction with Iraq, the United States and the United Nations.

"We're considering ending the mission by the end of the year," Defense Minister Yoshimasa Hayashi told reporters Thursday.

Officials cited the improved security situation in Iraq and the expiration at the end of the year of the U.N. Security Council resolution that sets the legal basis for the U.S. troop presence in Iraq.

Hayashi also suggested it was time to pay more attention to Afghanistan, where violence fueled by the Taliban insurgency has spiked over the past year.

"In a way, the importance of operations in Afghanistan has increased," Hayashi said.

Japan's air force has airlifted materials and armed troops since 2006 from Kuwait to locations in Iraq, including Baghdad, in support of U.S.-led forces. The mission has involved about 210 personnel.

Prior to the airlift mission, Japan deployed about 600 army troops to the southern city of Samawah on a humanitarian mission from 2004 until 2006.

The Iraq missions have deeply split public opinion in Japan, where critics have opposed the military dispatches as a violation of the country's pacifist constitution. The 1947 U.S.-drafted charter bans Japan from engaging in warfare.

Japanese officials said they would continue to provide other nonmilitary aid to Iraq.

"Even if we withdraw the Air Self-Defense forces, our determination to support Iraq will not change," said Foreign Minister Masahiko Komura.

The announcement comes as Japan's divided government is debating the fate of its anti-terrorism maritime mission in the Indian Ocean, which expires in December.

The mission began in 2001 to support U.S.-led forces in Afghanistan. But the government had to suspend it late last year after the opposition blocked the mission's extension in parliament.

In January, the government managed to pass a more restricted mission that banned direct help to forces in Afghanistan, limiting Japanese ships to refueling vessels making anti-terror patrols.

The six-month mission was extended for another six months in June. Approval by parliament will be needed to continue the mission after that.

In recent months, officials have floated the idea of dispatching Japanese troops to Afghanistan, but have backed down in the face of strong domestic opposition.