The present invention relates to compounds that inhibit dipeptidyl peptidase IV (DPP-IV) and are useful for the prevention or treatment of diabetes, especially type II diabetes, as well as hyperglycemia, Syndrome X, hyperinsulinemia, obesity, atherosclerosis, and various immunomodulatory diseases.