Japan's Maritime Self-Defence Force is only allowed to deploy defensively
Two Japanese warships are to join an anti-piracy mission off Somalia.
The two destroyers are to set sail on Saturday and are expected to reach the Gulf of Aden in about three weeks.
Their deployment follows a defence ministry decision in January, which required approval by parliament and the prime minister.
Japan's pacifist constitution allows its forces to mount operations only in self-defence, making the decision to deploy so far from home controversial.
The two ships, Sazanami and Samidare, will carry a total of about 400 sailors and coast guard officials.
Their initial role is to protect Japanese ships as well as those carrying Japanese cargoes or crews.
They will be allowed to fire only in self defence and to protect Japanese nationals in an emergency.
The public concern has been that Japan must not be drawn into military actions far beyond its own shores and interests.
But the mission has been gaining support in recent weeks.
World leaders have called for more action to tackle piracy
"Piracy off Somalia is a threat to Japan and the international community," Defence Minister Yasukazu Hamada told reporters.
"It is an important duty for the Self-Defence Forces to protect Japanese lives and assets," he said.
No Japanese ship has been taken by pirates yet, the government said, but pirates have fired at three Japanese vessels.
Japan's forces are engaged in other operations overseas, in Iraq, Afghanistan, and as UN peacekeepers.
But these have largely been logistics and support missions, providing re-fuelling, transport and reconstruction.
Japan's deployment comes three months after China sent ships to join the anti-piracy patrols.
Although current rules of engagement allow the two Maritime Self-Defence Force destroyers to protect only Japanese ships, nationals and cargo, this could change.
Prime Minister Taro Aso's Liberal Democratic Party has proposed legislation that would widen the scope of the mission, allowing the ships to escort foreign vessels in danger.
If passed by parliament it would also allow the sailors to use weapons in a broader range of circumstances if engaged by pirates.
The United Nations Security Council decided in early December to extend for another year its authorisation for countries to enter Somalia's territorial waters, with advance notice, and use "all necessary means" to stop acts of piracy and armed robbery at sea.
Piracy has taken an increasing toll on international shipping, especially in the Gulf of Aden, one of the world's busiest sea lanes.