WARSAW — The European Parliament accused Poland’s right-wing government on Wednesday of undermining democracy, overwhelmingly adopting a resolution urging it to respect the decisions of a top Polish court.

A constitutional crisis that has gripped the country for five months has allowed the right-wing Law and Justice party to govern with a free hand, prompting protests nationwide.

The European Parliament resolution, backed by a coalition of liberal and left-wing factions and passed in a meeting in Strasbourg, France, calls on the Polish government to respect the decisions of the country’s Constitutional Tribunal, which is empowered to review Poland’s laws.

The motion urged the European Commission, the executive arm of the European Union, to take actions to force the Polish government to follow the resolution’s recommendations. If the Polish government fails to do so, it could face penalties.