The Mediterranean island nation of Malta has become the first European country to criminalize therapeutic methods that purport to change a person’s sexual orientation or gender identity, the government and activist groups said.

That measure was one aspect of far-reaching legislation approved by Parliament on Monday that also includes provisions that support transgender rights. In a statement, the government said the two bills “prohibit the pathologization of any sexual orientation, gender identity or gender expression.”

The first bill focused on so-called conversion therapy, a discredited collection of quasi-psychoanalytic methods that aim to change a person’s sexual orientation or gender identity. It is also sometimes known as “reparative therapy” or, when religious methods are used, “ex-gay ministry.”

Conversion therapy has been increasingly in the spotlight in the weeks since Donald J. Trump won the United States presidential election because of speculation that his running mate, Vice President-elect Mike Pence, supports the practice. Mr. Pence has denied that is the case.