Stocks in the healthcare sector posted gains as the broader market recovers.

Novartis said it returned to sales growth in the second quarter, as momentum from some of its key medicines and recent launches helped the company offset a hit from drugs that lost patent protection.

Novo Nordisk filed a lawsuit against rival Eli Lilly, arguing that the Indianapolis drugmaker uses deceptive advertising to mislead consumers, in the latest escalation of the weight-loss wars.

The Trump administration is freezing more than $1 billion in Medicaid funding to California and Minnesota. The freeze is part of an effort to prevent Medicaid fraud, Health and Human Services Secretary Robert F. Kennedy Jr. and Centers for Medicare and Medicaid Administrator Mehmet Oz said.

Write to Patrick Sullivan at patrick.sullivan@wsj.com