Spanish lawmakers have voted to approve a tough new anti-smoking law, meaning that from 2 January, bars and restaurants will be no-smoking zones.
Smokers will also not be allowed to light up on television broadcasts, near hospitals or in school playgrounds.
The bill, proposed by PM Jose Luis Rodriguez Zapatero and his governing Socialist Party, was passed in the lower house by 189 votes to 154.
Bar and cafe owners fear the law will adversely affect business.
Spain was once famed for its smoke-filled bars, corner cafes and restaurants, but the new law tightens restrictions introduced in 2006 by forbidding smoking in any enclosed public space.
Tuesday's vote rejected a Senate amendment to allow casinos to have smoking areas. Moves to allow bars to build sealed cubicles for smokers also failed.
While the 2006 anti-smoking law prohibited smoking in the workplace, it came under fire for letting bar and restaurant owners choose whether or not to allow smoking: most permitted it.
Bar owners have complained that the new legislation will lead to a massive loss of business - bad news for an industry that has already seen a drop of 15% in sales from the recession.
But doctors argue the new legislation will help smokers give up, which correspondents say is vital when 160 Spaniards a day die from smoking-related illnesses, four of them from passive smoking.
Spanish Health Minister Leire Pajin has called on Spaniards to share responsibility for the new law's success.