The first bill was scuppered with 178 votes against and 172 in favour, while the second was rejected with 184 against and 166 in favour. (EPA Images pic)

MADRID: Spain's parliament on Friday shot down government bills aimed at quelling nationwide protests over a housing crisis that were sparked by the eviction of an 87-year-old woman.

The lawmakers' rejection of the two measures dealt a blow to prime minister Pedro Sanchez and his centre-left government ahead of general elections scheduled for 2027.

"Shame!" yelled hundreds of protesters outside the parliament building as the bills were quashed. Fresh demonstrations were due to take place across Spain on Saturday.

Spain has been gripped by protests for a week, including a tent city set up in the heart of Madrid, to rail against increasingly unaffordable housing for both tenants and buyers and demand swift action.