Yale University has agreed to bring back the ROTC for the first time in decades after Congress voted to allow gays to serve openly in the military.

Yale President Richard Levin and Navy Secretary Ray Mabus signed an agreement Thursday that establishes the Naval ROTC's formal presence at Yale for the first time since the early 1970s. Harvard University welcomed back the Reserve Officers Training Corp in March and Columbia University said Wednesday it would sign an agreement allowing the ROTC back onto campus.

"The renewal of a formal relationship with Yale will serve to bring dozens of new and talented officers who will carry on Yale's tradition of service into the Navy and Marine Corps each year," Mabus said. "The presence of NROTC will enrich and strengthen both the military and the educational experience of all students."

The ROTC left prominent universities amid anti-Vietnam War sentiment. Colleges more recently kept it off campus because of the military's policy on gays, which they considered discriminatory. Congress repealed the so-called don't ask, don't tell policy in December.

A handful of Yale students have been involved with ROTC, but they must attend training at other colleges.

The ROTC unit at Yale will be the Navy's only ROTC unit in Connecticut. The Yale unit's first class of ROTC midshipmen will enter in the fall of 2012.

In addition to Yale students, the unit will enroll students from other public and private universities in the state that participate under crosstown arrangements.

"The new Navy ROTC unit at Yale continues the university's proud tradition of educating students who serve our country's armed forces," Levin said. "From Lexington to Afghanistan, our students and graduates have contributed to the nation's defense, and the return of NROTC will make it easier for the most talented young men and women who aspire to leadership in our military to gain a Yale education."

The establishment of the Yale unit will make Naval ROTC much more attractive for Connecticut students, many of whom would otherwise travel substantial distances to the nearest Naval ROTC program, officials said.

Sen. John Kerry, D-Mass, a Yale alumnus who had urged Yale to bring the ROTC back, welcomed the agreement.

"This is a terrific day for Yale and for the Navy, and President Levin and Secretary Mabus deserve huge credit for the investment of time and effort and personal commitment they shared to make this happen," Kerry said. "Any time you make peace with the past and make a new beginning, it's important, and this is an accomplishment worthy of celebration."

Yale officials also said they hope to enhance their affiliation with Air Force ROTC.

Votes by Yale faculty on May 5 paved the way for the re-establishment of ROTC on its campus, and the Yale Corporation, the university's governing board, voted its approval on May 24. A survey conducted by the Yale College Council last fall found that an overwhelming majority of Yale students support having ROTC on the Yale campus, college officials said.

Yale noted that its connections to the military date to the nation's founding when Yale President Ezra Stiles led more than half of the student body to take on the overwhelming Redcoat troops in 1779 when the largest flotilla ever to enter Long Island Sound attacked New Haven. Twenty-five Yale graduates served as Generals for the Union Army during the Civil War, and almost 9,500 Yale graduates and students served in World War I. During World War II, the campus was largely given over to the military, and over 20,000 soldiers, sailors and marines were trained on campus at Yale.

Soon after the enactment of the National Defense Act of 1916, which authorized ROTC units at universities, Yale immediately joined and its unit was over-subscribed by Yale students. In 1916, a group of Yale undergraduates formed the Yale Unit, which became the first group of reserve pilots in the Navy. Most of them served in World War I.