Japan's conservative government revised the country's central education law Friday to require schools to encourage patriotism in the classroom and upgraded the Defense Agency to a full ministry for the first time since World War II.

The measures, enacted in a vote by Parliament's upper house, form key elements of Prime Minister Shinzo Abe's push to bolster Japan's international military role, build up national pride and distance the country from its post-1945 war guilt.

The votes were important victories for Abe's government, which has seen its popularity decline over the perception that he has not paid enough attention to domestic issues.

The education measure, the first change to Japan's main education law since 1947, calls on schools to "to cultivate an attitude that respects tradition and culture, that loves the nation and home country."

The reform reflected concerns voiced by Abe and strident Education Minister Bunmei Ibuki that Japan's long stretch of economic prosperity has eroded the morals and cooperative spirit of prewar Japanese.

"The new education law will allow children to acquire a good understanding of their heritage and become intelligent and dignified Japanese," ruling party lawmaker Hiroo Nakashima said during the upper house debate.

Critics, however, attacked the move as harkening back to Japan's war-era education system, in which children were instructed to support the country's imperialist military and sacrifice themselves for the emperor and nation.

"The government is putting the future of Japanese children at risk and turning Japan into a country that wages war abroad," said Ikuko Ishii, a Communist Party lawmaker.

The call for more patriotism in the schools coincides with a push by some local governments to crack down on teachers and students who refuse to stand for the national flag or sing an anthem to the emperor at school ceremonies.

The upgrading of the Defense Agency under the Cabinet Office to a full ministry passed Parliament without significant opposition, propelled by deep concern in Japan over North Korean missile and nuclear weapons development.

The upgrade, to be effected early next year, gives Japan's generals greater budgetary powers and prestige — a reversal for a military establishment that has kept a low profile since being discredited by Japan's disastrous wartime defeat.

Postwar Japan has been solidly pacifist under the 1947 U.S.-drafted constitution, which foreswears Japan from using force to settle international disputes, and Tokyo maintains fighting forces only for self-defense. The U.S. bases some 50,000 troops in Japan under a security alliance.

That pacifist stance, however, has eroded with the end of the Cold War, U.S. demands that Japan cooperate more in military matters, and the North Korean threat. Japan dispatched non-combat troops to Iraq in 2004-2006, and Abe has expressed interest in joining more similar missions.

The defense ministry upgrade was needed "because of the importance of the troops' mission to protect peace and independence of our country," said Takeaki Kashimura, foreign affairs and security committee chairman of the upper house.