TOKYO — After years of watching its international influence eroded by a slow-motion economic decline, the pacifist nation of Japan is trying to raise its profile in a new way, offering military aid for the first time in decades and displaying its own armed forces in an effort to build regional alliances and shore up other countries’ defenses to counter a rising China.

Already this year, Japan crossed a little-noted threshold by providing its first military aid abroad since the end of World War II, approving a $2 million package for its military engineers to train troops in Cambodia and East Timor in disaster relief and skills like road building. Japanese warships have not only conducted joint exercises with a growing number of military forces in the Pacific and Asia, but they have also begun making regular port visits to countries long fearful of a resurgence of Japan’s military.

And after stepping up civilian aid programs to train and equip the coast guards of other nations, Japanese defense officials and analysts say, Japan could soon reach another milestone: beginning sales in the region of military hardware like seaplanes, and perhaps eventually the stealthy diesel-powered submarines considered well suited to the shallow waters where China is making increasingly assertive territorial claims.

Taken together those steps, while modest, represent a significant shift for Japan, which had resisted repeated calls from the United States to become a true regional power for fear that doing so would move it too far from its postwar pacifism. The country’s quiet resolve to edge past that reluctance and become more of a player comes as the United States and China are staking their own claims to power in Asia, and as jitters over China’s ambitions appear to be softening bitterness toward Japan among some Southeast Asian countries trampled last century in its quest for colonial domination.