Mac McGarry, the avuncular TV quizmaster of “It’s Academic” who spent a half-century pitching local teenage contestants hundreds of thousands of fastball trivia questions about topics as diverse as Shakespeare, Michelangelo, Chubby Checker and the chemical makeup of paint, died Dec. 12 at his home in Potomac. He was 87.

The cause was pneumonia, said his son Mark McGarry.

With an easy-going baritone that sounded like a throwback to the days of fedoras and big bands, Mr. McGarry thrived well into the Internet age. As host of “It’s Academic,” which launched in 1961 and became the longest-running quiz program in TV history, he liked to describe himself as the area’s most inquisitive man.

A Washington radio and TV personality, he carved a multifaceted career spanning six decades. He covered presidential inaugurations and the start of the Korean War. He also hosted a big-band radio show, was an early TV sparring partner of Willard Scott and appeared with a young Jim Henson and his Muppets.

But it was as the bespectacled face of “It’s Academic” that Mr. McGarry became a Saturday staple for generations of Washington brainiacs who competed for scholarship money and intellectual glory. So earnestly does the weekly program take academic achievement that cheerleaders and marching bands became part of the show’s backdrop, rooting on their school’s teams.

Mr. McGarry, a graduate of academically rigorous Jesuit schools in New York, was the show’s first host. He said he believed in the show’s mission to “put these kids out front, where they belong.”

The show’s creator, the late Sophie Altman, started “It’s Academic” on Washington’s NBC affiliate, WRC (Channel 4). She later brought the same format, sometimes under different names, to more than a dozen markets nationwide.

Former contestants in Washington and elsewhere include former secretary of state Hillary Rodham Clinton (chosen as an alternate for her Illinois high school), former Washington Post Co. Chairman Donald E. Graham, political commentator George Stephanopoulos, Sen. Charles E. Schumer (D-N.Y.) and Pulitzer Prize-winning author Michael Chabon.

Actress Sandra Bullock, who attended Arlington’s Washington-Lee High School, appeared as a cheerleader.

In addition to his hosting duties in Washington, Mr. McGarry emceed the educational quiz show on NBC’s Baltimore affiliate from 1973 to 2000.

Mr. McGarry prepared vigorously for the show by researching pronunciations. He once spent an hour on the phone with the Russian Embassy until he could say a Russian word properly.

On the show, he read questions from cue cards and decided whether teams won or lost points. Three teams of three students from dozens of local high schools competed against each other and the clock.

Typical questions included: “What mythological figure has the whole world on his shoulders?” Answer: “Atlas.”

“If you had been a voter in the 1896 and 1900 presidential elections, your choice of candidates would have been limited to men with what same first name?” Answer: “William,” for McKinley and Bryan.

Mr. McGarry once said the most popular profession for former teammates is law, although one contestant became a shepherd.

At times, Mr. McGarry told The Post in 1985, the show has served as a “reflection of the way our country was.”

He noted, for example, that the turmoil of the late 1960s produced one young male contestant who said his plans for the future centered on consuming a great deal of marijuana. He said the show’s producers, to their credit, left it in.

Mr. McGarry was, for the most part, unflappable in the face of teenage unpredictability. But he lost his usual composure when a student was once asked who defeated Napoleon at Waterloo.

“Duke Ellington,” the contestant replied.

The noble rank was right, but the American jazz bandleader had little else in common with the Duke of Wellington.

“I tried not to laugh, but I had to hang my head on the rostrum,” Mr. McGarry said.

Maurice James McGarry was born in Atlanta on June 15, 1926. He grew up in New York City, where his father became a real estate analyst for the New York Central Railroad. The younger McGarry graduated from New York’s Regis High School and, in 1947, from Fordham University.

He was working for a radio station in western Massachusetts before a Fordham classmate, the celebrated baseball announcer Vin Scully, urged him to apply for a summer announcing job at WRC-TV in 1950.

During his first five years at the NBC affiliate, Mr. McGarry was a general staff announcer, providing voice-overs for all occasions. In 1955, he was cast as the “straight man” to Willard Scott on WRC-TV’s “Afternoon,” a variety show that featured Jim Henson, then a University of Maryland at College Park student.

Initially the show’s second banana, Mr. McGarry won admirers for his singing and for keeping up with Scott’s banter. Show director James Kovach told The Post at the time that Mr. McGarry “has a lot more talent than anyone realized.”

Mr. McGarry continued hosting variety shows until “It’s Academic” turned up. Although never a ratings leader, the show stayed put in large part because of its long sponsorship by Giant Food. Mr. McGarry retired from it in 2011.

His first wife, Barbara Walter, the daughter of then-Rep. Francis Walter (D-Pa.), died in 1955 after two years of marriage.

Survivors include his wife of 54 years, Babette Lohe McGarry of Potomac, Md.; four children from his second marriage, Stephen “Mac” McGarry of Bethesda; Laura Lanke of Skillman, N.J., and twins Mark McGarry of Germantown, Md., and Andrea Cremins of Ashburn, Va.; two sisters; and six grandchildren.

According to Washingtonian magazine, in the show’s first 39 years, Mr. McGarry missed only one taping. He spoke of being energized professionally by appearing with high school students.

“It is a reflection of their enthusiasm,” he told The Post in 2005. “I look forward to it. It’s always exciting. It allows me the grand delusion that I’m not getting older.”