The Supreme Court on Monday morning upheld a federal law that bars “debt relief agencies,” including lawyers, from advising clients to incur more debt for filing for bankruptcy. In Milavetz, Gallop & Milavetz v. United States, an Edina, Minn.-based law firm asserted that lawyers should not be covered by the law, and the district court ruled that the law was unconstitutional as applied to the firm.

The Court, in a decision authored by Justice Sonia Sotomayor, ruled that lawyers are included in the definition of debt relief agencies, and that the requirements of the law don’t run afoul of the First Amendment. Justices Antonin Scalia and Clarence Thomas wrote separate concurrences.