JAKARTA, Indonesia — Thousands of protesters gathered outside of Parliament and in cities across Indonesia on Monday urging the president, Joko Widodo, to halt legislation aimed at crippling anti-corruption efforts and sharply reducing personal freedom.

Efforts by the outgoing Parliament to rush through a series of contested bills with the president’s approval before its five-year session ended Monday have aroused national concern over the measures, which opponents say would transform Indonesia into a less tolerant and more repressive society. Protesters fear the reintroduction of the measures after the new Parliament is sworn in on Tuesday.

One far-reaching measure, a proposed revision of the criminal code, would outlaw abortion except in cases of rape and incest and prohibit sex outside marriage, effectively banning gay and lesbian relations. It also would restrict free speech by strengthening laws on blasphemy and treason and making it a crime to insult the president.

Student-led protests, which began last week, compelled Mr. Joko to put a hold on many of the bills, including the criminal code revision. But that is not enough for protesters, who want him to pledge not to let the crime bill come back.