TOKYO — Prime Minister Shinzo Abe of Japan won a crucial vote in the House of Representatives on Tuesday on an anti-conspiracy bill that he said was needed to fight terrorism but that critics feared could give the authorities broad surveillance powers over citizens.

With protesters gathered outside the country’s lower house of Parliament in Tokyo, Mr. Abe’s party and its allies approved a bill that would make it a crime to conspire with others to commit terrorism and a raft of other crimes.

Speaking before the vote, Hiroshi Hiraguchi, a member of the governing Liberal Democratic Party, expressed condolences for the victims of a suicide bombing that killed 22 people at a concert in Britain on Monday. He said that the bill was needed to help Japan fulfill “the grave responsibility” of hosting the 2020 Olympics in Tokyo.

Mr. Abe’s party called for the vote even as a United Nations expert on human rights accused the government of rushing the measure without sufficient debate on appropriate safeguards for privacy and free speech.