1888, emphatic form of no, with emphasis on the closing of the lips.
by 1889, American English, variant of yes or yeah, altered for emphasis, or possibly influenced by nope.