BUCHAREST, Romania (AP) — Romania's parliament says lawmakers can't be prosecuted for hiring close relatives to work in their offices before it became illegal to do so.

The motion was approved Wednesday by 306 lawmakers in the 378-seat Chamber of Deputies, the lower house of parliament. There was one abstention and the others lawmakers were absent.

The lawmakers argued they should not be punished retroactively for a law that came into effect in 2013, making it illegal for lawmakers to employ close relatives to work in their parliamentary offices.

The National Integrity Agency, which investigates conflict of interest by officials, says 32 lawmakers employed a close relative from 2011-2015.

Critics say Romania's Parliament is trying to weaken an anti-corruption fight which has targeted senior officials in recent years. Lawmakers are often critical of an ongoing effort by prosecutors to fight the corruption that has long been a part of political life in Romania.

In a related issue, Senators on Tuesday voted not to lift the immunity of former Foreign Minister Titus Corlatean, who is now a Senator.

The anti-corruption prosecutors' office asked for his immunity to be lifted so he can be indicted for abuse of office relating to charges that thousands of Romanians were impeded or prevented from voting in the 2014 presidential election.

Corlatean, who was foreign minister from 2012 to 2014, insists he acted legally in organizing ballot boxes at embassies and consulates. Corlatean's boss at the time, the former Prime Minister Victor Ponta, ran for president, and lost.