While the main campus of the Johns Hopkins University in Baltimore is open and inviting, there is another division of the school that discourages visitors.

The Hopkins Applied Physics Laboratory is tucked miles away in Laurel, with building access blocked by guards. Outsiders enter with an approved escort for the most part, handing over proof of identity first. Much of what goes on in there is secret — including some of the billions of dollars in work the lab does for the federal government.

The lab, and a facility at the University of Maryland in College Park where admitted National Security Agency leaker Edward Snowden once toiled, are two of 13 university-affiliated research centers doing contractual work for the Department of Defense in areas ranging from ship design to missile defense.

While the federal government and universities have collaborated since World War II, universities must balance academic integrity with the millions to be made in covert projects. Some universities have eschewed classified work because of the pitfalls; others have publicly bumbled the balancing act.

This week, a Hopkins dean ordered a university professor to take down a blog post criticizing the National Security Agency, which does business with the Applied Physics Laboratory. A lab employee had incorrectly claimed that the post linked to classified material. That led to an outcry from academics who questioned Hopkins' commitment to the free flow of ideas.

Proponents of classified research at universities say it helps the national good, brings in much-needed dollars and opens doors for students to get jobs in high-security fields after graduation.

But critics counter that teachers and students can't tell anyone about the work, so it won't bolster a curriculum vitae. And because the work can't be openly evaluated, it's tough to tell if it's in the public good.

"It's kind of a fundamental belief in American higher education that research is designed to be shared, it's designed to be disseminated," said Cary Nelson, an English professor at the University of Illinois' flagship campus and past president of the American Association of University Professors. "When you start crossing a line and decide, 'Well, I'll hide this and keep that secret,' the whole fabric begins to unravel.

"Academic freedom is so jealously guarded and vigorously pursued, the denial of it is a slippery slope," Nelson said.

Hopkins soon restored the post, and the dean apologized to the blogger, an outspoken assistant professor in the school's Information Security Institute named Matthew Green.

The episode shined a spotlight on classified efforts by universities, typically kept in the dark.

Other schools work for different federal agencies, such as NASA or the Department of Homeland Security. The University of Maryland, Baltimore County, for example, has a cybersecurity focus and a partnership with the National Security Agency.

Not all of their work is classified, nor is all of the work done under the partnerships with the Department of Defense.

Many schools that do classified work, as Hopkins and the University of Maryland do, say all classified research must be conducted off campus, even if it's only a short drive away.

"When classified research takes place, it occurs off-campus in order to make a clear distinction between research activity on-campus — where, in support of academic freedom, there is an open environment with no restrictions on the dissemination of the results of our research — and the sensitivity to needs of government and industry regarding certain topics that should not be in the open," Mike Lurie, a spokesman for the University System of Maryland, wrote in an email.

The system sets the classified-research policy for its member schools, including the University of Maryland.

Other schools expressly forbid the research altogether, including — at least for now — George Washington University, where a policy states that "classified research is not compatible with open communication of knowledge" and therefore, as a general rule, not accepted or performed.

But this spring, George Washington approved a 10-year plan that allows the university to "explore modifying" policies to "allow some faculty and staff members to engage in classified research." The plan also raises the possibility of building a specialized facility for the work on the university's Science and Technology campus in Virginia.

"There is a lot of funding in this area, and we're not competitive for that funding" said Leo Chalupa, vice president for research at George Washington.

"We're here, five blocks from the White House, and we're big in areas like cybersecurity and homeland security," Chalupa said. "I'm told by people in the field that, boy, if we had classified research, there's so much more possibility to get funding and expand these areas."

It's far from a done deal, Chalupa stressed, noting that administrators "certainly are not going to do something like this without the buy-in from the faculty."

A federal-university partnership developed by President Franklin D. Roosevelt during World War II led to scientific breakthroughs "critical to the war effort," according to a 2012 publication by the National Research Council, including penicillin, jet propulsion, radar and the atomic bomb.

Hopkins' Applied Physics Laboratory, established in 1942, was among the labs created in that effort. Its job was to improve ships' abilities to fend off air attacks, which it did by developing a "proximity fuze" that boosted the effectiveness of anti-aircraft shells.

"On the basis of that successful collaboration, the government, Johns Hopkins, and APL made a commitment to continue their strategic relationship," a statement on the lab's website reads.

In a statement, Johns Hopkins University spokesman Dennis O'Shea said the lab has been a "vital division of the university" and that the school is proud of its "accomplishments and contributions, from helping to win World War II to landing the first spacecraft on an asteroid to sending probes to Mercury and Pluto.

"In fact, just this week, APL played a key role in the determination that Voyager 1 is the first human artifact to enter interstellar space," O'Shea said.

On its website, the lab says it has about 5,000 employees, roughly 3,400 of them scientists or engineers, working on more than 600 programs primarily for the Departments of Defense and Homeland Security, NASA and National Security Agency affiliates.

The 13 university-affiliated research centers, or UARCs, working with the Department of Defense "operate in the public interest, and are subject to strict organizational and personal conflict-of-interest requirements," Navy Cmdr. Amy Derrick-Frost, a Department of Defense spokeswoman, said in a statement.

Several of the partnerships, including one with the Center for Advanced Study of Language, located just off the University of Maryland's College Park campus, came about after the attacks of Sept. 11, 2001, when defense funding ballooned and language proficiency became increasingly important.

The UMD center, sponsored by the NSA, was founded in 2003 and "is the first and only national resource dedicated to addressing the language needs of the Intelligence Community and the DoD," Executive Director Amy Weinberg, a former professor, wrote in an emailed response to questions.

The center also received unwanted attention this summer, after former NSA contract employee Edward Snowden, who grew up in Maryland, revealed the NSA's massive telephone- and Internet-surveillance program. He worked as a security specialist at the center beginning in 2005.

Officials there deflected questions about their work at the time.

Weinberg did not respond to a question about how much funding the center had received. The 112 people on the research staff do both classified and unclassified research, she said, and their work has applicability in the everyday world.

For example, CASL worked on "adult language learning" that can be applied to education from kindergarten through college, she said.

When forging partnerships, universities are preferable over business partners, largely because of their independence, Julie Ziegenhorn, a spokeswoman for U.S. Strategic Command, said in an email.

STRATCOM, as it's known, has since October 2012 sponsored a $2 million partnership with the University of Nebraska that focuses on combating weapons of mass destruction.

"As a long-term strategic partner focused on these missions without profit motive or conflict of interest, the UARC functions as an independent, trusted advisor and honest broker," Ziegenhorn said. "The UARC is answerable only to the government customer and has no vested interest in particular technologies or solutions. The UARC is also charged with educating scientists, engineers, and lawyers in relevant disciplines and to advocate government service as a career path."

Some university-affiliated research centers working with the Department of Defense do not do classified work.

The Army-sponsored Institute for Creative Technologies at the University of Southern California does not do classified research but has brought in hundreds of millions of dollars since its founding in 1999, with a 2011 contract extension through next year worth $135 million.

It combines "Hollywood, gaming and artificial intelligence" techniques to "transform traditional military instruction, health therapies" and more, according to a brochure on the institute. The lab has created virtual humans that can serve as training video characters, museum guides and practice patients.

The Institute for Soldier Nanotechnologies at the Massachusetts Institute of Technology also is sponsored by the Army and does not perform classified research. The institute, founded in 2002, receives about $9.7 million from the Army each year for basic research.

In an emailed statement, institute executive director William Peters said, "The mission of the ISN is to help the U.S. Army dramatically improve soldier protection and survivability through basic research and nanotechnology."

tricia.bishop@baltsun.com

twitter.com/triciabishop