The Japanese government has invoked a rarely-used power to force through a controversial naval bill.
Japan's ships have been deployed in the Indian Ocean since 2001
The ruling party used its lower house majority to override opposition lawmakers, who had voted down the bill in the upper house hours earlier.
It was the first such move in more than 50 years, and followed months of deadlock over the proposed legislation.
The bill will allow Japanese ships to resume a refuelling mission supporting US-led operations in Afghanistan.
The deployment, which Prime Minister Yasuo Fukuda says is vital to Japan's standing in the international community, could now be resumed as early as next month.
But the opposition argues it violates the post-war pacifist constitution and lacks a mandate from the United Nations.
The row had become increasingly embarrassing for the government.
The Japanese navy has been providing fuel to coalition forces in the Indian Ocean since late 2001.
But the ships were forced to withdraw in November last year after opposition lawmakers - who won control of the upper house in July - blocked an extension of their mandate.
The government revised the legislation limiting the scope of the mission but this failed to placate the opposition.
Early on Friday, it made good on its pledge to block the bill in the upper house.
The legislation was immediately returned to the lower house, where the Liberal Democratic Party used its sizeable majority to force it through by 340 votes to 133.
The move will please the US, which has lobbied hard for a resumption of the mission.
"By passing this legislation, Japan has demonstrated its willingness to stand with those who are trying to create a safer, more tolerant world," said Thomas Schieffer, the US ambassador in Tokyo.