MSPs have voted to introduce a ban on smoking in public places in Scotland from April next year.
Protesters unveiled a poster opposing the smoking ban
Health Minister Andy Kerr said the ban was the most important health law for a generation and he hoped it would "de-normalise" smoking.
MSPs voted by 83 votes to 15 with three abstentions to support the Smoking, Health and Social Care (Scotland) Bill.
The licensed trade association warned it would lead to hundreds of pubs closing and thousands of job cuts.
It means that from April 2006 it will be an offence to smoke in any pub, restaurant or club in Scotland.
Pub licensees and others who fail to enforce the law could face fines of up to £2,500.
Persistent smokers who defy a ban could be fined up to £1,000.
Mr Kerr called it "a tribute to devolution" that Scotland was going for a total ban.
"Each year environmental tobacco smoke is associated in Scotland with the deaths of over 800 people who have never smoked," he said.
Mr Kerr added: "That is why we must take this historic step, this bold step and this right step to improve the health of the people of Scotland.
"I am delighted that so many MSPs from different political perspectives have united around this, the most important piece of public health legislation in a generation."
The Scottish National Party's Shona Robison said: "For me it comes down to a very simple question and that is, on the balance of probabilities, will this measure improve public health or not improve public health?
"My assessment, having listened to all of the evidence and seen for myself the impact in Ireland, is that it will improve public health."
She continued: "For so many children in so many communities, smoking is seen as a normal activity - that all around them, people smoke."
The Conservative Party, which argued that a voluntary ban was already working, is against the crackdown.
Health spokeswoman Nanette Milne insisted: "I do fear that there will be displacement of smoke to the home with a potential increase in home consumption of alcohol, itself a public health problem.
"I feel for smokers, particularly women, being forced outside into inferior facilities when their habit is a legitimate one."
She went on: "I'm concerned for the pensioners who will miss the conviviality of their pint and cigarette at their local in the company of their pals, particularly in small villages, where there is no choice of licensed premises."
The Scottish Socialist Party threatened to oppose the bill because of its provision allowing the NHS to participate in joint ventures with the private sector to improve services.
Central Scotland MSP Carolyn Leckie argued: "Contained within this bill are some clauses that if not removed are so fundamental that the SSP and perhaps others who have policies which are pro-public finance will end up having to oppose the bill."
But she said: "I don't need research or statistics to persuade me that second-hand smoke has a detrimental effect on health."
Plans for an all-out smoking ban have sparked a heated row
An SSP amendment stating the bill's section on joint ventures potentially undermined its cross-party support was defeated by 75 votes to nine with 17 abstentions.
The licensed trade association has called for a limited ban and said, if the evidence from the Republic of Ireland is anything to go by, 150 pubs will be forced to close and more than 2,000 jobs lost.
It unveiled a giant poster of Mr McConnell with the slogan: "Why Jack-in smoking in pubs? There is a sensible alternative."
Paul Waterson, chief executive of the Scottish Licensed Trade Association (SLTA), said: "We have always been completely reasonable in our opposition to an outright smoking ban, which is unnecessary and unpopular.
"There are reasonable and enforceable alternatives which would protect the health of workers and the public alike, and which would prevent massive job losses in the licensed trade in Scotland."
The smokers' rights campaign group Forest said the ban was unreasonable and out of step with Scottish public opinion.
The measures will go back to the health committee for detailed amendments but the bill is expected to come into effect in the spring of next year.