Wal-Mart and other retailers challenged Maryland’s new law requiring Wal-Mart to spend more on employee health care, arguing before a Baltimore judge Friday that only the federal government may dictate health spending by private companies.

Maryland’s law requiring large employers to spend at least 8 percent of payroll on health care or pay the difference in taxes is worded so that only Wal-Mart Stores Inc. would be affected. The Retail Industry Leaders Association, which includes Wal-Mart, argued that the law unfairly targets the world’s largest retailer. Barring court intervention, the law takes effect in January.