L. Rafael Reif smiles as he addresses a news conference after he was announced as the 17th president of the Massachusetts Institute of Technology in Cambridge, Mass., Wednesday, May 16, 2012. Reif was elected to the post Wednesday morning by the MIT Corporation and will assume the presidency on July 2, 2012. (AP Photo/Stephan Savoia)

The U.S. government's rhetoric and policies on immigration could "have serious long-term costs," Massachusetts Institute of Technology President L. Rafael Reif said in an email to the school community Tuesday.

The relationship between the U.S. and China has been strained in recent months over escalating tariffs. The U.S. has also raised national security concerns about Chinese technology firms like Huawei, against which the Justice Department has filed criminal charges in two cases.

In the email, Reif discussed how tensions between China and the U.S. have bled onto MIT's campus. He warned of the risk for justified concerns about "academic espionage" in service of the Chinese government to morph into "a toxic atmosphere of unfounded suspicion and fear."

"Looking at cases across the nation, small numbers of researchers of Chinese background may indeed have acted in bad faith, but they are the exception and very far from the rule," Reif wrote. "Yet faculty members, post-docs, research staff and students tell me that, in their dealings with government agencies, they now feel unfairly scrutinized, stigmatized and on edge – because of their Chinese ethnicity alone."

Reif said national security risks are a top priority for him, but said excessive scrutiny of immigrants will hurt both the U.S. and MIT.

"Protracted visa delays. Harsh rhetoric against most immigrants and a range of other groups, because of religion, race, ethnicity or national origin. Together, such actions and policies have turned the volume all the way up on the message that the US is closing the door – that we no longer seek to be a magnet for the world's most driven and creative individuals. I believe this message is not consistent with how America has succeeded. I am certain it is not how the Institute has succeeded. And we should expect it to have serious long-term costs for the nation and for MIT," Reif wrote.

Read Reif's message to the MIT community below:

To the members of the MIT community, MIT has flourished, like the United States itself, because it has been a magnet for the world's finest talent, a global laboratory where people from every culture and background inspire each other and invent the future, together. Today, I feel compelled to share my dismay about some circumstances painfully relevant to our fellow MIT community members of Chinese descent. And I believe that because we treasure them as friends and colleagues, their situation and its larger national context should concern us all. The situation As the US and China have struggled with rising tensions, the US government has raised serious concerns about incidents of alleged academic espionage conducted by individuals through what is widely understood as a systematic effort of the Chinese government to acquire high-tech IP. As head of an institute that includes MIT Lincoln Laboratory, I could not take national security more seriously. I am well aware of the risks of academic espionage, and MIT has established prudent policies to protect against such breaches. But in managing these risks, we must take great care not to create a toxic atmosphere of unfounded suspicion and fear. Looking at cases across the nation, small numbers of researchers of Chinese background may indeed have acted in bad faith, but they are the exception and very far from the rule. Yet faculty members, post-docs, research staff and students tell me that, in their dealings with government agencies, they now feel unfairly scrutinized, stigmatized and on edge – because of their Chinese ethnicity alone. Nothing could be further from – or more corrosive to ­– our community's collaborative strength and open-hearted ideals. To hear such reports from Chinese and Chinese-American colleagues is heartbreaking. As scholars, teachers, mentors, inventors and entrepreneurs, they have been not only exemplary members of our community but exceptional contributors to American society. I am deeply troubled that they feel themselves repaid with generalized mistrust and disrespect. The signal to the world For those of us who know firsthand the immense value of MIT's global community and of the free flow of scientific ideas, it is important to understand the distress of these colleagues as part of an increasingly loud signal the US is sending to the world. Protracted visa delays. Harsh rhetoric against most immigrants and a range of other groups, because of religion, race, ethnicity or national origin. Together, such actions and policies have turned the volume all the way up on the message that the US is closing the door – that we no longer seek to be a magnet for the world's most driven and creative individuals. I believe this message is not consistent with how America has succeeded. I am certain it is not how the Institute has succeeded. And we should expect it to have serious long-term costs for the nation and for MIT. For the record, let me say with warmth and enthusiasm to every member of MIT's intensely global community: We are glad, proud and fortunate to have you with us! To our alumni around the world: We remain one community, united by our shared values and ideals! And to all the rising talent out there: If you are passionate about making a better world, and if you dream of joining our community, we welcome your creativity, we welcome your unstoppable energy and aspiration – and we hope you can find a way to join us. * * * In May, the world lost a brilliant creative force: architect I.M. Pei, MIT Class of 1940. Raised in Shanghai and Hong Kong, he came to the United States at 17 to seek an education. He left a legacy of iconic buildings from Boston to Paris and China to Washington, DC, as well on our own campus. By his own account, he consciously stayed alive to his Chinese roots all his life. Yet, when he died at the age of 102, the Boston Globe described him as "the most prominent American architect of his generation." Thanks to the inspired American system that also made room for me as an immigrant, all of those facts can be true at the same time. As I have discovered through 40 years in academia, the hidden strength of a university is that every fall, it is refreshed by a new tide of students. I am equally convinced that part of the genius of America is that it is continually refreshed by immigration – by the passionate energy, audacity, ingenuity and drive of people hungry for a better life. There is certainly room for a wide range of serious positions on the actions necessary to ensure our national security and to manage and improve our nation's immigration system. But above the noise of the current moment, the signal I believe we should be sending, loud and clear, is that the story of American immigration is essential to understanding how the US became, and remains, optimistic, open-minded, innovative and prosperous – a story of never-ending renewal. In a nation like ours, immigration is a kind of oxygen, each fresh wave reenergizing the body as a whole. As a society, when we offer immigrants the gift of opportunity, we receive in return vital fuel for our shared future. I trust that this wisdom will always guide us in the life and work of MIT. And I hope it can continue to guide our nation. Sincerely, L. Rafael Reif

Subscribe to CNBC on YouTube.

WATCH: Why the US thinks Huawei has been a massive national security threat for years