In a division pressed by the opposition, Lok Sabha Deputy Speaker P M Sayeed declared the motion for consideration of the Prevention of Terrorism Bill, 2002, adopted with 425 Ayes and 296 Nos.
The Congress led an opposition walkout after the result was announced. Later, the bill was passed by a voice vote.
The joint sitting, the third of its kind in the Central Hall of Parliament, was necessitated after the bill was passed by the Lok Sabha and rejected later by the Rajya Sabha.
The law provides for capital punishment for terrorist killings, 90 days of detention without trial and special courts to deal with terrorist cases.
The Bahujan Samaj Party and Trinamool Congress -- a Bharatiya Janata Party ally -- abstained from the proceedings, while the All India Anna Dravida Munnetra Kazhagam and the Nationalist Congress Party supported the measure.
During the eight-hour debate, the opposition pilloried the government for seeking to "bulldoze" the legislation and said that the "black law" would be misused against political opponents and minorities.
Piloting the bill and later replying to the debate, Home Minister Lal Kishenchand Advani said that a stringent law was need for a decisive victory over terrorism, especially state-sponsored terror from across the border.
Opposing the bill for its "anti-democratic" features, Congress president and leader of the opposition Sonia Gandhi said that the "time has come" for Prime Minister Atal Bihari Vajpayee to decide if his "primary duty" was to protect the people's welfare or "succumb to internal pressures of his party and its sister organisations".
"Will he be submissive and weak in his leadership or will he uphold the prestige of the high office he holds. His moment of reckoning has come," she said.
In a sharp counterattack, Vajpayee said: "I have been accused of working under pressure. This is wrong. I do not work under pressure from anyone. My parliamentary career has been ample testimony to this."
A visibly angry prime minister said he was not holding the office courtesy the Congress.
"People want me and I will remain prime minister till they want," he said, questioning the language used by Gandhi in her "written" speech.
Referring to her charge that he was under pressure from the Sangh Parivar, Vajpayee said: "This is a matter regarding Parivar. Sonia Gandhi should not interfere."
Former prime minister Chandrashekhar said he had no option but to oppose the bill because of the way the government was trying to push it through.
Another former prime minister, Deve Gowda, opposed it saying the government was trying to divide the country.
Communist Party of India-Marxist leader Somnath Chatterjee and Samajwadi Party leader Mulayam Singh Yadav felt the measure could be misused, as was being done "selectively" in Gujarat.
Law Minister Arun Jaitley, in his intervention, said that the bill was being opposed for political considerations. It had a number of safeguards that were not there in the Terrorist and Disruptive Activities (Prevention) Act enacted by the Congress, he added.
The Anti-terror Bill: The Complete Coverage
Tell us what you think of this report