Ukrainian President Petro Poroshenko, right, congratulates the new prime minister, Vladimir Groysman. (Roman Pilipey/European Pressphoto Agency)

After months of political gridlock over stalled reforms and accusations of corruption, Ukraine’s parliament on Thursday approved a new government led by a close ally of President Petro Poroshenko.

Vladimir Groysman, a member of Poroshenko’s parliamentary bloc and the chairman of Ukraine’s parliament since 2014, was voted in as prime minister in a 257-to-50 vote that simultaneously approved the resignation of the outgoing prime minister, Arseniy Yatsenyuk.

Yatsenyuk’s government was plagued by an exodus of reformist ministers over accusations of graft and delays in sorely needed disbursements from a $17.5 billion bailout loan from the International Monetary Fund.

Yatsenyuk barely survived a confidence vote in February after Poroshenko said that “surgery” was needed to fix government disorder and urged him to step down.

Business circles close to both Poroshenko and Yatsenyuk have been accused of corrupt dealings even as the country has deepened trade and political ties with the European Union.

On Wednesday, the Ukrainian prosecutor general’s office confirmed to the Interfax news service that it was investigating an allegation of a $3 million bribe given to Yatsenyuk to appoint the head of the country’s broadcasting agency.

Meanwhile, documents leaked from a prominent Panamanian law firm suggested that Poroshenko had opened an offshore tax haven as some of the worst fighting against pro-Moscow rebels was raging in east Ukraine in 2014. Poroshenko has denied wrongdoing.

But this week’s political intrigue in Kiev is seen as more a product of the long-standing political crisis, not the revelations from the Panama Papers reports.

Groysman has called reinstating IMF support a priority, but critics, including members of his own party, have said that his election will further consolidate power under Poroshenko and do little to prevent corruption.

Serhiy Leshchenko, a member of Groysman’s party who opposed his election as prime minister, claimed the new prime minister had been supported by members of parliament loyal to wealthy businessmen, suggesting backroom deals.

In remarks before Thursday’s vote, Groysman attempted to bolster his credentials as a reformer and allay concerns from international creditors. In particular, he targeted the criticism that Ukrainian politicians had allowed the crisis in east Ukraine to overshadow the need for political reform in Kiev.

“I understand the threats facing us,” Groysman told lawmakers. “In particular, I would like to highlight three threats: corruption, ineffective governance and populism, which do not pose less of a threat than the enemy in eastern Ukraine."