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.
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…