The vote on the constitutional amendment was delayed for several hours as the opposition tried to stop the measure coming into law.
Outside, demonstrators rallied in a last-ditch show of protest.
Many Japanese are attached to the pacifist provisions in the constitution which banned fighting overseas.
The bills have already passed through the government-dominated lower house.
The Japanese government says that the changes in defense policy are vital to meet new military challenges such as those posed from a rising China.
It wanted to hold the vote before a five-day holiday begins on September 19. The governing coalition has a majority in both chambers of the Diet, meaning that ultimately the opposition camp was powerless to stop the measure becoming law.
Masaaki Yamazaki, the president of the upper house, said the bills were passed with 148 lawmakers voting in support and 90 against.
More than 200 hours have been spent deliberating the legislation, the Japan Times reported, and its approval by parliament fulfils one of PM Shinzo Abe’s long-held ambitions.
On September 17, opposition politicians tried to physically delay proceedings ahead of a committee vote on the bills.
The bills prompted large public protests for months.
The changes re-interpret rather than formally change the constitution.
However, critics say this will violate the pacifist constitution and could lead Japan into unnecessary US-led wars abroad.
Speaking in parliament on September 18, Akira Gunji, of the opposition Democratic party, said: “We should not allow such a dangerous government to continue like this.
“Prime Minister Abe’s security bill is a threat to our legal framework.”
Supporters of the measures, which are backed by Washington, insist they are essential for the defense of Japan and its regional allies, and will permit greater involvement in peacekeeping activities around the world.
Critics have focused on what they say is ambiguity in how the principles of the legislation will be interpreted, and the possibility that future governments will interpret them more broadly.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…