Greg Novik, the eccentric and colorful former advertising executive who turned bagel maker when he and his wife founded Greg’s Bagels in Belvedere Square, died Wednesday of pancreatic cancer at his Cheswolde home. He was 71.

Mr. Novik, recognized by his salt-and-pepper beard and hair that looked like he styled it by sticking his fingers into an electrical outlet, seemed in perpetual motion as he raced from kitchen to cash register in his bakery-cafe, all the while spouting one-liners to customers.

He was far from a traditionally garbed professional baker: Mr. Novik favored oversized shirts that he never bothered to tuck in, black pants that were usually covered in flour and scratched black shoes whose toes he had removed.

For nearly 30 years he was a beloved figure who dispensed humor and bagels with equal aplomb, and came to be known as the “mayor of Belvedere Square.”

Charles Vascellaro, a Baltimore writer and a former longtime bartender at nearby Grand Cru, recalled meeting Mr. Novik in 2003 at the Belvedere market. “Here was the wild, crazy and eccentric person who was like a whirling dervish, and we said, ‘Who is this guy?’” Mr. Vascellaro said with a laugh.

“Greg’s Bagels had a familial atmosphere both figuratively and literally. You knew what to expect when you went in there,” said Stan “The Fan” Charles, publisher of the sports publication Press Box. “It had a gravitas that you’d find nowhere else. Greg kept you coming back.”

“Greg’s Bagels was a mixing place of all kinds of different people,” said Michael Olesker, a former Baltimore Sun columnist, author and a friend of nearly 40 years.

Louis Gregory Novik — he later ditched the Louis — was born in Cleveland. His father was a nuclear physicist and his mother an accomplished pianist. His family moved to Chevy Chase, and after graduating from high school he entered the Johns Hopkins University and in 1968 received a degree in economics.

Mr. Novik’s love of music began early in life, and he mastered the piano, saxophone, bass and guitar. During his college years and for some time afterward he toured with The Resumes, The Newports and even had his own band, Greg Novik and the Novacanes. In 1969, he recorded “Stainless Steel” with the band New Apocalypse. He had written, produced and arranged the song, and played guitar on the recording.

His professional career began in 1970 when he was hired by Hutzler’s department store as coordinator of its broadcast advertising. In 1979, he became a freelance writer and created ad campaigns and jingles for clients such as Stewart’s department store, Lexington Lady, Care First, Baltimore Blast, Maryland National Bank and Channel 45.

“We did a lot of music together, and he was uniquely situated working for an ad agency,” said Richard D. Lake of Homeland. “We collaborated on jingles. I played the keyboard while Greg played the bass and guitar. He wrote the music and then we would go into the studio and record it.”

“Greg had a great sense of humor,” said Mr. Lake, “and could come up with a clever line in a moment that would take someone else a month to come up with.”

From 1984 to 1988, Mr. Novik was creative director for Image Dynamics. But by the late 1980s he was increasingly disenchanted with the advertising business and decided to quit.

His romance with bagels began on a Sunday afternoon in 1986, when he and his wife, the former Kathleen “Kathy” Thompson, whom he married in 1968, decided to make bagels. They pulled down a copy of “The Jewish Cookbook” and made a batch.

“Rock hard,” Mr. Novik told The Sun in a 1990 interview. “It was like eating a stone. I think they were so horrible tasting that it spurred us on to try again.”

They eventually perfected their recipe, in which a bagel is rolled by hand, boiled and then baked using high-quality ingredients.

With $30,000 in savings, a $5,000 loan from a friend and no business experience, the couple opened Greg’s Bagels in 1989 in Belvedere Square.

At first business was slow — opening day receipts totaled $81 dollars — but soon customers lined up in the signature back-and-white tiled store for bags of bagels, lox and bagel-based sandwiches.

“When a customer came in, you’d jump up, grab and hug them and give them a free bagel,” Mr. Novik said in 1990. “You had a lot of chiselers. But you had a lot of people who said: ‘These are amazing.’”

In a 1997 column, Mr. Olesker wrote that Mr. Novik’s bagels were the “creme de la creme, the bagel de la bagel, in all of bageldom.”

When other merchants began fleeing Belvedere Square — which was shuttered in 1995 — Mr. Novik refused to leave. He once said it was so lonely there that he wished he’d be mugged so he’d have someone to talk to.

“As everyone was leaving, Greg kept asking for for updates, and I told him to stay,” said Bill Cunningham, a former city councilman. “For a long time when I went in there, he’d give me the stink eye.”

In 2003, the restored market reopened with new businesses, vitality and vibe, and going to Greg’s Bagels was “like going to Cheers,” said Mr. Lake.

Mr. Novik employed high school students who worked weekends and summers.

“He affected the lives of so many people, especially the kids,” Mr. Lake said. “Greg’s Bagels was like a crucible, and many of them went on to do really great things.”

“He was like an uncle to thousands of nieces and nephews and he liked being their crazy eccentric uncle,” Mr. Vascellaro said.

“Greg could never bring himself to fire anyone. He’d just try and help them out,” his wife said.

One of Mr. Novik’s closest Belvedere Square friends was the late Nelson Carey, proprietor of Grand Cru. A wine lover, Mr. Novik would enter the bar carrying an empty glass and, while leaving a trail of flour in his wake, would bellow, “Nelse, Nelse, I have an evaporation problem” or “Someone stole my wine.” Mr. Carey would dutifully replenish the glass.

“Greg built the ideal family business and his merchant neighbors were like his family. That’s why he and Nelson had this philosophical connection,” said Christy Carey, Mr. Carey’s wife. “Plus, they liked making people happy.”

Mr. Novik was diagnosed with pancreatic cancer in July 2016 and was given three to six months to live. He closed the store that August, then sold the business to Tommy Hearn, who reopened it earlier this year.

For 25 years, Mr. Novik and his wife had traveled to Luxemborg several times a year and stayed at Hotel Vitner. Even facing a difficult medical prognosis, he was able to travel to Paris three times before his death, his wife said.

“He was the most happy and optimistic guy, and even though he was tired and dragging at the end of the day, he was still happy and optimistic,” said Ned Atwater, founder of Atwater’s. “I always envied him that he found time to have a glass of wine and go on vacation. He was able to put work in perfect balance.”