Hard to believe, but Barbara Eden swears there was a time she pretty much forgot about Jeannie, the irrepressibly vivacious, astronaut-loving genie she played for five seasons on TV.

“I didn’t really think about her,” Eden says over the phone from Las Vegas, where she and her husband, real estate executive Jon Eicholtz, often spend time when they’re not at home in Beverly Hills. “The show was on the air — it’s never been off the air — but I was doing lots of movies, appearing in Vegas, doing shows. I think people are making a lot more out of Jeannie than they did in the ’80s and ’90s.”

Ever since “I Dream of Jeannie” went on the air in 1965, fans have been doing just what the title implies. Many of them will doubtless show up this week at the Hunt Valley Delta Hotel, where Eden will be among the celebrity guests at the annual Mid-Atlantic Nostalgia Convention signing autographs, posing for pictures and answering questions about her career — primarily questions about that beautiful 2,000-year-old genie who spent five seasons trying to convince astronaut Tony Nelson that she was the gal for him.

(And seriously, has there ever been a TV character more clueless than Larry Hagman’s Major Nelson? There wasn’t a male of any age watching the show who wouldn’t have gladly traded places with him — and who would have needed a lot less convincing. Coincidentally, Bill Daily, who played his comrade Major Healey before going on to “The Bob Newhart Show,” died Sept. 4 at 91.)

Eden, 87, laughs a lot when she talks about Jeannie. The role, she says, came to her unexpectedly. True, she had appeared in the 1964 comedy “The Brass Bottle,” in which it’s Tony Randall who finds a genie in a bottle and has to endure its well-meaning attempts to make life better through magic. But that genie was played by Burl Ives; Eden played Randall’s frustrated girlfriend.

Eden heard about the Arabian Nights-inspired part TV producer Sheldon Leonard had dreamed up (at least partly, according to legend, in response to the popularity of “Bewitched,” another sitcom with a magical woman at its center), and thought it sounded like fun. But as a blond, she didn’t think she had a chance.

“They were testing every single gorgeous brunette in town,” she says. “They were all beauty queens — Miss Syria, Miss Israel, Miss Greece, Miss Italy. I thought, ‘Well, it’s not for me. But it certainly sounds good.

“I was sent a script. … My agent called and said, ‘What do you think, Barbara?’ I said, ‘Well, I think it’s fabulous. But are you sure they know what I look like?’ And he said, ‘Well, they must, they’ve made an offer.’ ”

So Eden got cast as an Arab girl imprisoned two millennia ago for spurning the advances of the Blue Djinn. Nice to know Miss San Francisco 1952 stood a chance against all those dark-haired beauties.

“You betya,” Eden says.

But Jeannie’s appeal — as well as Eden’s — has always stretched beyond her appearance. Early in her career, she began exhibiting a flair for comedy; her first role as a TV regular was on the sitcom “How to Marry a Millionaire,” based on the movie with Marilyn Monroe, Betty Grable and Lauren Bacall.

And while TV series have never wanted for attractive stars, few have had the lasting appeal of “I Dream of Jeannie.” The show’s setup was classic, Eden notes, with time-tested elements of magic, domesticity and romance. And it was topical — with America ensconced in a space race, where better to set a sitcom than NASA?

Eden and Hagman always appeared to be having fun, and few sitcom actors have done slapstick better than Hagman. There was a playful innocence to the show that may not have been sophisticated, but was definitely endearing. “I have never thought of myself as the sexy actress,” Eden says. “I’m not. There are a lot more beautiful women out there. But I was always comedic. Comic, that’s me.”

The Arizona native, born Barbara Jean Morehead, had been plugging away in Hollywood since 1956, when she appeared in a short-lived variety series hosted by a young Johnny Carson. At least twice, she got to play the distractingly beautiful newcomer who none of the men can keep their eyes off of — in a 1962 episode of “The Andy Griffith Show,” as a manicurist who unwittingly makes all the men in Mayberry suddenly want to have perfect nails, and a 1957 last-season episode of “I Love Lucy” (her third acting gig, Eden says), where Ricky and Fred aren’t interested in dancing with their wives, but can’t hit the dance floor fast enough when Eden’s blond bombshell shows up.

“Lucy” star Lucille Ball “couldn’t have been nicer or more supportive,” Eden says. “She wanted to sign me to a contract afterwards. She said, ‘There aren’t many pretty girls who can play comedy. I would love to have you here working.’ I wanted to, badly, but I had already tested at [20th Century] Fox, and while I was shooting with Lucy, they made the phone call and picked up my option. So I went to Fox.”

In 1960, she got to play Elvis Presley’s love interest in “Flaming Star” and enjoy some private concerts during breaks. “We would sit there, and he’d have his guitar,” she recalled. “And he had two friends with him that had their guitars, and his daddy was there. They’d play their guitars and sing. It was just the nicest, most pleasant thing. Just great.”

After “Jeannie” went off the air in 1970, Eden appeared in Las Vegas, starred in the occasional TV movie, toured in road shows — including an early ’70s production of “Annie Get Your Gun” at the old Painters Mill Music Fair in Owings Mills.

There was a second sitcom, a 30-episode run of “Harper Valley PTA” in 1981-82, inspired by the Jeannie C. Riley song about a mother whose scandalous behavior (and short hemlines) shocks the town prudes.

But Jeannie remains Eden’s signature role, one whose appeal hasn’t dimmed. At a recent fan convention in Northern Virginia, fans young and old, male and female — including mothers with their daughters in Jeannie-inspired costumes — lined up to gush a bit, get an autograph and snap a selfie or two.

“She is so easy to live with,” Eden says of her magical alter-ego. “I really like her.”