BELGRADE, Serbia — When President Aleksandar Vucic of Serbia nominated Ana Brnabic to the powerful post of prime minister this month, the West hailed it as a landmark decision that put her on course to become the country’s first female and first openly gay premier.

But some deeply conservative politicians called her nomination part of a degenerate Western plot, and critics on the left and some lesbian, gay, bisexual and transgender Serbs dismissed her as Mr. Vucic’s puppet.

They were appalled that Ms. Brnabic had agreed to join what they call Mr. ’s autocratic government, handing him a weapon — her sexual orientation — to potentially use as a cover for human rights abuses, to stifle independent news media and to erode nascent democratic institutions in the last Balkan country with a pro-Russian government.

But on Wednesday in Belgrade, the capital, Ms. Brnabic, a relative novice on Serbia’s political scene, faced down opponents in a speech at the Parliament. (On Thursday, it voted in the new government and approved her as prime minister — a mere formality given her support in the legislature — following a lengthy debate.) Striking a defiant tone, she addressed the insults head on.