Nonsteroidal anti-inflammatory drug use and prednisolone equivalent dose >5 mg per day were associated with an increased risk of NAFLD, whereas hydroxychloroquine use and prednisolone equivalent dose ≤5 mg per day were associated with a decreased risk of NAFLD.