Updated

At a time when the U.S. military is facing threats on multiple fronts -- most immediately, the advances of the Islamic State in Syria and Iraq, where the terror group recently seized Ramadi -- President Obama told U.S. Coast Guard Academy graduates that climate change needs to be added to that list of threats.

"This is not just a problem for countries on the coast or for certain regions of the world. Climate change will impact every country on the planet. No nation is immune," the president said. "So I am here today to say that climate change constitutes a serious threat to global security, an immediate risk to our national security, and, make no mistake, it will impact how our military defends our country. And so we need to act -- and we need to act now."

The president delivered the message at the Coast Guard Academy in New London, Conn.

The president in recent months has pressed for action on global warming as a matter of health, as a matter of environmental protection and as a matter of international obligation.

He even couched it as a family matter, linking it to the worry he felt when one of his daughters had an asthma attack as a preschooler.

His speech to the cadets, by contrast, focused on what the Obama administration says are immediate risks to national security, including contributing to more natural disasters that result in humanitarian crises and potential new flows of refugees. Further, the president said he sees climate change aggravating poverty and social tensions that can fuel instability and foster terrorist activity and other violence.

Obama said the cadets would be part of the first generation of officers to begin their service in a world where it is increasingly clear that "climate change will shape how every one of our services plan, operate, train, equip and protect their infrastructure."

As for the impact in the U.S., Obama pointed to streets in Miami and Charleston, S.C., that flood at high tide and to military bases around the country already feeling negative effects.

"Around Norfolk, high tides and storms increasingly flood parts of our Navy base and an air base," Obama said of military facilities in Virginia. "In Alaska, thawing permafrost is damaging military facilities. Out West, deeper droughts and longer wildfires could threaten training areas our troops depend on."

With the Republican-led Congress resistant to Obama's push for more environmental regulation in response, the president has been using executive orders to cut greenhouse gas emissions and making the issue a theme of speeches. But his climate change agenda has drawn strong political opposition and a number of legal challenges. Many of the GOP presidential candidates for 2016 have said that taking unilateral steps to address climate change could hurt the U.S. economy.

Obama's appearance at the Coast Guard Academy was his second and last commencement address of the season after speaking earlier this month at a community college in South Dakota. The president traditionally delivers a commencement address every year to one of the service academies.

Later Wednesday, he was visiting Stamford, Conn., for a Democratic fundraiser at a private home, with about 30 supporters contributing up to $33,400 each.

The Associated Press contributed to this report.