Two Japanese destroyers are already in the Gulf of Aden
The lower house of Japan's parliament has approved a bill to allow the country's naval ships to take a bigger role in fighting pirates off Somalia.
The bill will mean the navy can escort non-Japanese ships and use weapons for more than just self-defence purposes.
Japan's forces currently play a limited role abroad, because of the country's pacifist post-war constitution.
Although the bill is likely to be rejected by the upper house, the government can still turn it into law.
Two destroyers from Japan's Maritime Self Defence Force are already on patrol off the coast of Somalia, where pirates have been seizing vessels for ransom.
They are there to protect Japanese ships or those with Japanese cargoes or crews, and sailors can use their weapons only in very limited circumstances, including self-defence.
The new legislation approved by the lower house of parliament is intended to widen the navy's role, according to the BBC correspondent in Tokyo, Roland Buerk.
Somali pirates have stepped up attacks on shipping in recent months
If the law is passed, Japan's naval forces will be able to escort any ship and have more leeway to fire, such as at suspected pirate vessels which fail to heed warnings not to approach commercial vessels.
The government is keen to expand its military's range, and is seeking a greater role in international security, our correspondent says.
Prime Minister Taro Aso said the safety of shipping was a priority for a trading nation, and Japan had to heed calls from the world for it to make further contributions.
But the opposition, and many Japanese people, are wary of taking any steps to water down Japan's pacifist constitution.
The bill is likely to be rejected by the upper house of parliament where the opposition has a majority.
But the government can turn the measure into law by passing it through the lower house a second time.