KIEV, Ukraine — Mykola Azarov, the prime minister of Ukraine, resigned on Tuesday, hours before a planned vote of no confidence by Parliament that could have stripped him of his powers.

The pro-government Party of Regions also joined with opposition lawmakers on Tuesday to repeal most of the laws in a package of legislation restricting freedom of speech and assembly that had been enacted recently.

Together, the resignation and repeals were significant concessions by Ukraine’s embattled president, Viktor F. Yanukovych, as well as clear signs of the building momentum of opposition to his rule.

In a statement, Mr. Yanukovych said he had accepted Mr. Azarov’s resignation and signed a decree dismissing the rest of the cabinet as well. But he said Mr. Azarov and the ministers would stay on until Parliament approved a new cabinet.