MOSCOW — The Ukrainian Parliament on Thursday began enforcing a new law requiring lawmakers to check guns, explosives and other weapons at the door before entering the legislative chamber, after a member arrived this month with a pistol and three hand grenades.

No law had prohibited the lawmaker, Nadiya V. Savchenko, from entering with the weapons, it turned out, but the episode unnerved her colleagues, spurred a prosecutorial inquiry over her intentions, and led to the adoption this week of the weapons prohibition.

In the country’s raucous domestic politics, brawls are common in Parliament, and apparently enough lawmakers also carry weapons that the new law immediately became contentious.

On Thursday, two members of Parliament declined to walk through a metal detector, saying the law was being enforced in a partisan fashion, with members of some parties subjected to more stringent checks.