The law “illustrates what is wrong with legislatures in New Jersey and across America, and that is governments caving in to special interests at the expense of consumers,” said Jeff Rowes, an institute lawyer who was involved in preparing the lawsuit.

The institute’s website describes it as a “libertarian public interest law firm” and says the cases it files are aimed at “preserving freedom of opportunity and challenging government’s control over our lives.” Officials of the archdiocese said they were approached by lawyers from the institute who had seen news reports about the fight between the archdiocese and the headstone companies.

The lawsuit alleges that the archdiocese was the specific target of the law because it is the only religious group with cemeteries in the state that has moved to sell headstones.

Last year, before the Assembly and the State Senate voted on the bills, the archbishop of Newark, John J. Myers, urged parishioners to voice their opposition, saying the measure would violate the separation of church and state.

Mr. Christie initially vetoed the measure because it was to have taken effect immediately, forcing people who had already made burial arrangements with the archdiocese to change their plans, at least as far as headstones were concerned. The Assembly and the Senate quickly passed revised versions that delayed implementation until next year. It was that bill that the governor signed.