(Reuters) - A day before it was due to come into effect, a federal judge has blocked a Mississippi law permitting those with religious objections to deny wedding services to same-sex couples and impose dress and bathroom restrictions on transgender people.

U.S. District Judge Carlton Reeves found on Thursday the wide-ranging law adopted this spring unconstitutionally discriminated against lesbian, gay, bisexual and transgender people and others who do not share the view that marriage is between a man and a woman.

Reeves issued an injunction blocking the law that was to take effect on Friday.

He agreed with opponents of the law who argued that it violated the U.S. Constitution's prohibition on making laws that establish religion.

Mississippi's "Protecting Freedom of Conscience from Government Discrimination Act" shields those believing that marriage involves a man and a woman, and sexual relations should occur within such marriages. It protects the belief that gender is defined by sex at birth.

The law allows people to refuse to provide wide-ranging services by citing the religious grounds, from baking a wedding cake for a same-sex couple to counseling and fertility services. It would also permit dress code and bathroom restrictions to be imposed on transgender people.

The law "does not honor that tradition of religion freedom, nor does it respect the equal dignity of all of Mississippi’s citizens," Reeves wrote in his decision.