KIEV (Reuters) - Television comedian Volodymyr Zelenskiy took the oath of office as Ukraine’s new president on Monday, promising that as hard as he had worked in the past to make Ukrainians laugh, he would now work to keep them from crying.

As his first act, he dismissed the parliament still dominated by loyalists of his defeated predecessor, setting up an election in two months in which his new party has a chance to win its first seats.

The inauguration day was marked by informal moments that conveyed the outsider persona that helped carry the political novice to a landslide victory last month.

Zelenskiy high fived cheering supporters who held their arms outstretched outside the Soviet-era parliament building, and stopped for a selfie with the crowd. At one point he jumped up to kiss a man on the forehead. He later eschewed a motorcade to make his way to his new office on foot.

“Dear people, during my life I tried to do everything to make Ukrainians smile,” he said in his speech to parliament. “In the next five years, I will do everything, Ukrainians, so that you do not cry.”

But there were already signs of friction with a political class in which Zelenskiy has few allies. Parliament is still dominated by the bloc named for Zelenskiy’s defeated opponent Petro Poroshenko and smaller parties founded mostly as personal vehicles for political insiders.

The decision to dissolve parliament prompted the resignation of Prime Minister Volodymyr Groysman, who came to power in 2016 as part of Poroshenko’s coalition. Groysman said he was stepping down to fight the upcoming snap election.

“I proposed to the president, the parliament, that we together form a new agenda and very quickly begin to make decisions that would make Ukraine stronger. The president has chosen a different path,” Groysman said.

Zelenskiy grew to national fame playing the TV comedy role of a schoolteacher who unexpectedly becomes president after a pupil films him making a foul-mouthed tirade against corrupt politicians and posts the video online. His campaign exploited the parallels with that fictional narrative, portraying him as an everyman who would stand up to a crooked political class.

In his inauguration speech, Zelenskiy called on officials to take down the customary portraits of the president that hang in their offices, and put up pictures of their children instead.

Groysman, a public face of a reform program aimed at attracting foreign aid, will step down on Wednesday in the same week as a mission from the International Monetary Fund is set to come to Kiev for talks about a $3.9 billion loan program. The government hopes to secure a $1.3 billion tranche within weeks.

Ukraine’s most pressing issue is conflict with its neighbor Russia, which annexed its Crimea region in 2014 and backed separatists in a war in the east that has killed 13,000 people.

Zelenskiy said his first task was to achieve a ceasefire, adding that dialogue could only happen after the return of Ukrainian territory and prisoners of war.

Slideshow ( 7 images )

“THANKS FOR CONTINUING TO DIVIDE PEOPLE!”

He briefly switched from the Ukrainian language to Russian during his speech to talk about the need to win over the hearts and minds of people in separatist areas.

That prompted the head of a populist party, Oleh Lyashko, to interrupt the speech to interject that Ukrainians living in Crimea and the east also understood Ukrainian.

Slideshow ( 7 images )

Zelenskiy replied: “They understand the Ukrainian language, yes. Thank you very much! Thanks for continuing to divide people, Mr. Lyashko!”

At the U.N. Security Council on Monday, Russia failed to get enough support to convene a meeting over a decision by Ukraine’s parliament last week that grants special status to the Ukrainian language and makes it mandatory for public sector workers.

Germany’s U.N. Ambassador Christoph Heusgen accused Russia of wanting to hold the meeting to “welcome the new Ukrainian president with an act of intimidation.” Russian U.N. Ambassador Vassily Nebenzia rejected his remarks.

Zelenskiy called on lawmakers to use the two months until the election to pass laws that would strip them of immunity from prosecution and ban officials from enriching themselves.

“You will have two months for this. Do it and you will deserve medals,” Zelenskiy said.

Despite his everyman image, critics accuse Zelenskiy of having too close a relationship with a powerful businessman, Ihor Kolomoisky, whose TV channel broadcasts his comedy shows. Zelenskiy has rejected those accusations.

Zelenskiy also said he wanted to replace the head of the state security service, the general prosecutor and the defense minister. He has so far not spelled out his nominations for key appointments that fall within his purview.

Kiev resident and Zelenskiy supporter Mykola Korniyenko welcomed the president’s move to dissolve parliament.

“Do you see how many of them are there? Four hundred fifty snouts who eat greedily but are never full, while we cannot buy proper food for ourselves, cannot get proper clothing, cannot afford proper housing. Is this right?”