The music of the brass and drum section set the cadence for the midshipmen marching into the hall, turning sharp corners and snapping to attention in front of the distinguished guests, faculty and veterans eager to celebrate the return of the Naval Reserve Ofﬁcers’ Training Corps to Columbia University after an absence of more than 40 years.

The president of Columbia, Lee C. Bollinger, stood beside retired Rear Adm. James Lowe, class of 1951, and Assistant Secretary of the Navy Juan Garcia III in a ceremony that, according to Mr. Bollinger, ofﬁcially “healed the breech” between the university and the military that developed during the Vietnam War and continued until the university senate voted in April 2011 to allow the Naval ROTC program’s return.

But only 50 blocks downtown, at the Macaulay Honors College of the City University of New York, an attempt to integrate the military with academia has been met with heated resistance.

David Petraeus, the retired general hired as an adjunct instructor last year, faced a small but vitriolic group of students who confronted him in the street on the way to his first class. They called him a “war criminal” and protested his appointment to the university. The group has since organized and gained support from other students and faculty under the name the “Ad Hoc Committee Against the Militarization of CUNY.”

The markedly different scenes, which played out late last year, exemplify the tension between American universities and the military, particularly during a time of transition for the armed forces. As the military downsizes and returns to pre-war force levels or below, many of those leaving the service will take advantage of the post-9/11 GI Bill to obtain a university education. At the same time, senior military leaders of the last decade are seeking post-retirement opportunities, with some turning to universities to take positions as lecturers.

Historically, the relationship between universities and the military has been complicated, though it wasn’t always so tense. During both World Wars, universities commissioned thousands of new ofﬁcers to serve in all branches of the armed forces. At the forefront of this effort was, perhaps surprisingly, the Ivy League.

In World War II, Cornell University commissioned 4,598 ofﬁcers, more than any other institution in the country, including the United States Military Academy at West Point. Each of the other Ivy League schools contributed as well, including hosting the largest Naval training program in the nation (Dartmouth), filling up the most positions in the Ofﬁce of Strategic Services (Yale), or conducting the ﬁrst research on atomic ﬁssion for The Manhattan Project (Columbia).

But public opposition to the war in Vietnam brought a wave of anti-military sentiment that never subsided within traditionally liberal universities. Under increased pressure from anti-war activists on college campuses, as well as stricter academic conditions imposed by university administrations, the military terminated 88 ROTC programs across the country in the late 1960s and early 1970s, including in ﬁve of the eight Ivy League schools. By the early 1990s, academia’s disapproval of the “Don’t Ask, Don’t Tell” policy created a new barrier to military presence at universities until it was repealed in 2011. In effect, for whatever reason they had at a given time, many of the nation’s elite schools closed their doors to the military as a national institution and kept them locked for more than 40 years.

In their book, Arms and the University, scholars Donald Downs and Ilia Murtazashvili present rational arguments for why an increased military presence on university campuses beneﬁts both sides, particularly in the form of ROTC programs. But universities since Vietnam have pushed back, and although, the authors write, they “pride themselves on being liberally minded and open to challenging ideas, this pride seems less merited when it comes to the military, even though the military is one of the most important institutions in American society.”

The case of CUNY and General Petraeus comes at a time when American society has broad respect for the military, but a limited understanding. Other retired high-proﬁle ofﬁcers have taken positions as university lecturers without incident, including Gen. Stanley A. McChrystal at Yale, Adm. Mike Mullen at Princeton, Adm. Eric T. Olson at Columbia and Gen. James Mattis at Dartmouth. A handful of others are full professors, such as retired colonels Peter Mansoor at Ohio State and Andrew Bacevich at Boston University.

The notion that the presence of General Petraeus and other former ofﬁcers is somehow an attempt by “the U.S. government and the CUNY administration to turn the university into an infamous ‘war college,’ ” as the student group’s ofﬁcial statement declared, seems overstated. If anything, exposure to the military through faculty, student veterans and ROTC programs is the best way for universities to play a part in bridging the civilian-military divide. Shutting the military out of these institutions only creates a separate class of citizens who volunteer to serve their country but have limited interaction with the very people they are charged with defending.

To their credit, the CUNY administration upheld the university tradition of the “reasoned expression of dissent” despite pressure to do otherwise. The interim chancellor, William P. Kelly, released a statement in support of General Petraeus’s appointment, citing that “foreclosing the right of a faculty member to teach and the opportunity of students to learn is antithetical to that tradition, corrosive of the values at the heart of the academic enterprise. We defend free speech and we reject the disruption of the free exchange of ideas.”

Back at Columbia, after the ofﬁcial ROTC ceremony ended, a group of civilians, veterans and service members mingled on the veranda to the background music of a Navy jazz ensemble. A few of the new midshipmen, several of whom are in their ﬁrst semester of college, had to leave the reception early to get to their next class. As they crossed under the bridge near 118th Street and Amsterdam Avenue, a few students walking in the opposite direction stopped to take a longer look at their fellow classmates wearing white Navy dress uniforms. They stared curiously, and then continued walking. Maybe next time they’ll say hello.

David Eisler is the program manager for Words After War, a literary nonprofit based in New York City. He is also a graduate student in international affairs at Columbia University. Previously, he served as a captain in the United States Army.