KIEV, Ukraine — Volodymyr Zelensky, a television comedian turned populist firebrand, took office as Ukraine’s president on Monday and immediately began to battle the political establishment.

Speaking to members of parliament in his inaugural address, Zelensky demanded that they approve the removal of top security officials and lift their own right to immunity from prosecution — all before he planned to dissolve the body and call early elections.

And, channeling the morally upright schoolteacher-turned-president he played on a popular TV show, Zelensky portrayed himself as a more down-to-earth leader than his predecessors. 

“I really want you not to hang my image in your offices,” Zelensky said. “Hang photos of your children there, and before every decision, look them in the eye.”

Many members of the country’s political and economic elite, however, are poised to test the depth of public support for Zelensky as parliamentary elections loom. And his own commitment to the anti-corruption agenda he espoused as a candidate remains to be seen. 

More broadly, Zelensky, an entertainer who has never held elected office, faces the daunting task of navigating both European geopolitics and U.S. domestic politics. A five-year-old war with Russian-backed separatists still simmers in eastern Ukraine, and Russia continues to control the Ukrainian peninsula of Crimea. 

Although the United States has backed Ukraine in its conflict with Russia, allies of President Trump have lashed out at Zelensky in recent weeks. Rudolph W. Giuliani, Trump’s personal attorney, has urged Ukrainian authorities to investigate the activities of former vice president Joe Biden in Ukraine. There is no evidence of improper conduct by Biden.

Zelensky’s team, however, has hesitated to get involved in what some advisers view as a U.S. domestic political battle. Giuliani referred to those Zelensky advisers as “enemies” of Trump in a Twitter posting on Saturday. 

Zelensky, who won with close to 75 percent of the vote over incumbent Petro Poroshenko, took the oath of office during a ceremony in parliament, in front of an audience that included U.S. Energy Secretary Rick Perry. 

He called on parliament to remove the head of the security services, the defense minister and the prosecutor general from their posts.

Zelensky said ending the war in eastern Ukraine was his top priority, but he insisted that he would not give up any territory to do so. He said that he was ready “for dialogue” — presumably with Russia — but that Moscow needed to return imprisoned Ukrainians. 

“So that our heroes don’t die anymore, I’m ready to do anything,” Zelensky said in his speech. “I’m ready to lose my ratings, my popularity, my post for peace to come — without losing our territories.”

Russian President Vladi­mir Putin pointedly did not congratulate Zelensky on Monday and gave no sign that he was ready to compromise. Putin spokesman Dmitry Peskov said that Crimea was “a region of Russia” and that the war in eastern Ukraine was Kiev’s to solve.

“President Putin will congratulate Zelensky with his first successes in resolving the internal conflict in southeastern Ukraine, as well as with his first successes in normalizing Russian-Ukrainian relations,” Peskov told reporters.As part of Ukrainian political tradition, Zelensky was sworn in using a 16th-century religious manuscript. He then assumed the symbols of the Ukrainian state, including a large mace. 

The 41-year-old added his own populist touches, in keeping with the image of an anti-establishment outsider from his unconventional campaign. Before entering parliament, Zelensky strode past his supporters, slapping high-fives, shaking hands, giving occasional kisses and, at one point, sharing a selfie with a woman.

His outsider image was largely based on the role that Zelensky played on his popular television series, “Servant of the People”: Vasyl Holoborodko, an unknown schoolteacher who is unexpectedly elected president after he delivers a scathing anti-corruption rant.

In reality, Zelensky runs a multimillion-dollar entertainment company centered on his popular comedy troupe, Kvartal 95. He ran a sophisticated, social-media-friendly campaign.

Zelensky in his address urged government ministers to resign and said he would dissolve parliament to clear the way for early parliamentary elections in two months. He is hoping to secure a strong showing for his new party on the heels of his landslide presidential election win.

Hours after the speech, Prime Minister Volodymyr Groysman said he would step down. 

The makeup of Zelensky’s administration is also uncertain. Analysts will be waiting to see whether any allies of one of Ukraine’s richest men, Ihor Kolomoisky, get official posts. 

Kolomoisky owns the TV channel that broadcasts Zelensky’s shows, and he returned to Ukraine last week after two years of self-imposed exile. He left the country after Poroshenko’s government accused him of embezzling more than $5 billion from his bank, PrivatBank, which was then nationalized.

Both Kolomoisky and Zelensky insist that their relationship excludes any political influence, but the ties between them appear to go beyond the merely commercial. For example, one of Kolomoisky’s attorneys is a key adviser to Zelensky.

Still, many hold out hope that Zelensky will be a transformative president.

“While not that much is known about Zelensky’s policy program, the consensus from those that have had any interaction with the president elect is that he is clever, business-savvy, a quick learner and that he genuinely has the good of the country at heart and does want to deliver change which is really what his electorate voted for,” wrote Timothy Ash, an analyst for BlueBay Asset Management in London. “He is a joker, but certainly no fool.”

Troianovski reported from Moscow. Natalia Abbakumova in Moscow contributed to this report.