Illinois is facing separate lawsuits from AbbVie and Novartis AG seeking to block a law regulating drugmakers’ contractual agreements with pharmacies under a federal drug discount program.

Chicago-based pharmaceutical giant AbbVie filed a lawsuit Friday in the US District Court for the Northern District of Illinois. The maker of blockbuster autoimmune treatment Humira alleges the state law violates its constitutional property rights by requiring it to transfer its federally discounted drugs to certain commercial pharmacies or face civil penalties.

Novartis filed a similar lawsuit the same day, arguing the law violates the supremacy clause of the Constitution because it restructures …