deputy bernard milton "barney" fife is deputy sheriff of mayberry. thin, wiry and high-strung, barney fancies himself an expert lawman even though—in reality—he is actually a bumbling goof. in episodes 001 and 002, andy refers to him as "cousin barney". in episode 025, his middle name is said to be "oliver"; in episode 082, his middle name according to his high school yearbook is "milton", in episode 157 (season 5) his middle initial is repeated as "p". he considers his position to be essential to keeping mayberry safe. even though the town has very little crime, he dubs the town: "mayberry, gateway to danger". andy keeps barney's crime-fighting shenanigans to a reasonable level, but tries to never step on his ego. due to barney's ineptitude with firearms, andy requires him to carry his service revolver unloaded and only issues him one bullet at a time, which barney keeps in his shirt pocket until needed. when barney does load and fire his weapon, he often accidentally shoots into the floor, narrowly missing his own foot. like andy, he has a steady stream of girlfriends, but his longest lasting relationship is with thelma lou. in episode 028, barney has just met thelma lou at the "junction diner". in season five, he takes a job as a detective in raleigh, leaving mayberry, but returns in seasons six through eight for guest appearances.