Spanish lawmakers on Thursday approved one of two housing decrees whose rejection by parliament last month triggered a November 29 early general election, a day after Wednesday's general strike in protest over housing costs, Reuters reported.

By a one-vote margin, the standing body of 69 caretaker deputies who remain in place after parliament's dissolution passed the decree, which includes rent caps, a temporary ban on evictions and limits on corporate purchases of residential property. The first decree passed 35-34.

The decree extends protections against evictions for tenants deemed by social services to be in a precarious financial or social position, as long as regional authorities cannot offer them an alternative residence. The measure will last until 2030, according to the Associated Press. It also seeks to curb real-estate speculation by stopping companies involved in the property market from buying homes for less than 70 percent of their value.

The body rejected, also by one vote, a second measure sought by tenants' associations calling for the automatic renewal of rental contracts.

The measures came into effect temporarily when the decrees were published in the official state gazette in early October, but their duration will depend on the outcome of the snap election later this month. The vote followed Wednesday's nationwide strike, the country's first general strike in 14 years, in which unions said about 4 million workers, around one-fifth of the workforce, took part to protest soaring rents and the cost of living.

Spain has a deficit of about 750,000 homes, set to grow to more than a million by 2028, according to the central bank. The average rental price of 1,176 euros is equivalent to about 98.7 percent of a young person's average monthly salary, according to the Youth Council of Spain. Prime Minister Pedro Sanchez hopes to harness voter resentment over housing in the November 29 election.