The present invention generally relates to topical compositions and methods of using the same. A preferred topical pharmaceutical composition comprises a nitric oxide-releasing active pharmaceutical ingredient in admixture with a hydrophilic composition and a hydrophobic composition wherein the nitric oxide-releasing active pharmaceutical ingredient comprises a nitric oxide-releasing compound having a diazeniumdiolate functional group.