The opposition objects to government plans to limit the number of journalists allowed to cover parliamentary proceedings.
The lawmakers’ protest delayed a budget vote, which was later held away from the main parliament chamber.
Hundreds of police surrounded protesters in a late-night stand-off.
Jaroslaw Kaczynski, leader of the right-wing Law and Justice party (PiS), earlier denounced the protest as “hooliganism”.
“We will not allow ourselves to be terrorized,” he said.
Jaroslaw Kaczynski left parliament with the PiS PM Beata Szydlo at about 03:00AM local time.
Opposition lawmaker Jerzy Meysztowicz told the TVN24 news channel that police used tear gas to clear a passage through protesters for their official vehicle.
The opposition accused the government of passing 2017 budget unlawfully on December 16 by transferring the key vote to a smaller hall and excluding the press.
It was the first since the restoration of democracy in 1989 that such a vote was held outside the main chamber of parliament.
Enough lawmakers were present for the budget vote to be valid, according to Jaroslaw Kaczynski and other PiS members, but the opposition demanded a rerun of the vote in the main parliament chamber next week.
“There is no proof that a quorum of lawmakers was present. We suspect that people who were not allowed to vote took part,” said leader of the opposition Nowoczesna party Ryszard Petru.
The ruling party has been accused of restricting press freedom since coming to power in 2015.
In 2017 only a few reporters will be allowed into parliament.
Only five selected Polish TV stations will be permitted to make recordings of parliamentary sessions.
The government argues that it does not believe the measures are restrictive.
Supporters of the move argue it will stop lawmakers from being accosted by journalists inside the parliamentary building.
Last night’s demonstration began when an opposition lawmaker held aloft a placard reading “free media”.
He was told by Speaker Marek Kuchcinski, who is a PiS member, that he would no longer be allowed to attend parliamentary proceedings.
However, by then other opposition lawmakers converged on the podium to demand press freedom and an end to censorship.
It is believed to be the first protest of its kind in the Polish parliament for 10 years.
The proposed new rules – due to be enforced in 2017 – ban all recording of parliamentary sessions except by the five selected television stations. They also restrict the number of reporters permitted to enter the building.
Human rights campaigners have also condemned the plans, with former dissident Seweryn Blumsztajn condemning them as a “return to communist-era practices”.
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…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…