TOKYO — Taking his nation another step away from its postwar pacifism, the government of Prime Minister Shinzo Abe discarded a nearly half-century ban on the export of weapons and military hardware on Tuesday, a move aimed at helping Japan assume a larger regional security role to offset China’s growing military might.

The decision, which had been under consideration for years before Mr. Abe took office, replaced the self-imposed ban dating to the late 1960s with new, still-restrictive guidelines that permit the export of weapons only to allies and partners that agree not to sell them to third nations without Japanese approval. The new guidelines will also make it easier for Japan to join multinational development projects for expensive new weapons systems, like the American-led effort to build the F-35 stealth fighter jet.

The move formalizes a change that had already begun in incremental steps a few years ago, as Japan created a growing number of exceptions to its export ban, known as the three principles. The principles were one of the most visible pillars of Japan’s post-World War II renunciation of war, along with its pacifist Constitution, which Mr. Abe has also said he wants to revise.

Adopted in 1967, the three principles originally prohibited arms sales to Communist nations, countries under United Nations sanctions and countries in armed conflict, but it eventually grew into a blanket ban on all weapons exports.