The people behind “rogue” National Park accounts and others could be prosecuted as hackers, according to legal experts.

This week, accounts including those belonging to various National Parks and to Nasa began tweeting out climate change information and data, in an attempt to counteract denials by the Trump Administration. But the government could shut down those accounts by using powers meant to stop hackers, according to lawyers.

In some of those cases, tweets have been posted by unauthorised users – either by people who weren’t allowed to post, or by ex-employees. That appears to have happened on both the Redwoods and Badlands National Parks accounts, both of which posted facts about global warming.

10 photographs to show to anyone who doesn't believe in climate change Show all 10 1 /10 10 photographs to show to anyone who doesn't believe in climate change 10 photographs to show to anyone who doesn't believe in climate change A group of emperor penguins face a crack in the sea ice, near McMurdo Station, Antarctica Kira Morris 10 photographs to show to anyone who doesn't believe in climate change Floods destroyed eight bridges and ruined crops such as wheat, maize and peas in the Karimabad valley in northern Pakistan, a mountainous region with many glaciers. In many parts of the world, glaciers have been in retreat, creating dangerously large lakes that can cause devastating flooding when the banks break. Climate change can also increase rainfall in some areas, while bringing drought to others. Hira Ali 10 photographs to show to anyone who doesn't believe in climate change Smoke – filled with the carbon that is driving climate change – drifts across a field in Colombia. Sandra Rondon 10 photographs to show to anyone who doesn't believe in climate change Amid a flood in Islampur, Jamalpur, Bangladesh, a woman on a raft searches for somewhere dry to take shelter. Bangladesh is one of the most vulnerable places in the world to sea level rise, which is expected to make tens of millions of people homeless by 2050. Probal Rashid 10 photographs to show to anyone who doesn't believe in climate change Sindh province in Pakistan has experienced a grim mix of two consequences of climate change. “Because of climate change either we have floods or not enough water to irrigate our crop and feed our animals,” says the photographer. “Picture clearly indicates that the extreme drought makes wide cracks in clay. Crops are very difficult to grow.” Rizwan Dharejo 10 photographs to show to anyone who doesn't believe in climate change Hanna Petursdottir examines a cave inside the Svinafellsjokull glacier in Iceland, which she said had been growing rapidly. Since 2000, the size of glaciers on Iceland has reduced by 12 per cent. Tom Schifanella 10 photographs to show to anyone who doesn't believe in climate change A river once flowed along the depression in the dry earth of this part of Bangladesh, but it has disappeared amid rising temperatures. Abrar Hossain 10 photographs to show to anyone who doesn't believe in climate change A shepherd moves his herd as he looks for green pasture near the village of Sirohi in Rajasthan, northern India. The region has been badly affected by heatwaves and drought, making local people nervous about further predicted increases in temperature. Riddhima Singh Bhati 10 photographs to show to anyone who doesn't believe in climate change A factory in China is shrouded by a haze of air pollution. The World Health Organisation has warned such pollution, much of which is from the fossil fuels that cause climate change, is a “public health emergency”. Leung Ka Wa 10 photographs to show to anyone who doesn't believe in climate change Water levels in reservoirs, like this one in Gers, France, have been getting perilously low in areas across the world affected by drought, forcing authorities to introduce water restrictions. Mahtuf Ikhsan

"An unauthorized user had an old password in the San Francisco office, went in and started retweeting inappropriate things that were in violation of their policy," White House spokesman Sean Spicer said about the Redwoods posts. Separately, the National Park Service said tweets published earlier this week on the account of the Badlands National Park in South Dakota were posted by a former employee not authorized to use the account.

At the moment, those staff aren’t apparently being sought for prosecution and the FBI hasn’t been involved. But they could be, legal experts said.

Some of the more permanent rogue accounts – the “alt” pages that have been set up to share information since officials organisations are banned from doing so – have already been handed over to other activists to keep those behind them from retribution or prosecution.

Employees or former employees publishing unauthorized messages on official accounts could be prosecuted under the U.S. Computer Fraud and Abuse Act, which prohibits someone from exceeding authorized access to computers. "The argument would be that the authorization to use the account was only for employees and implicitly that was extinguished when the employee left government employment," said Orin Kerr, a law professor at George Washington University.

Even employees authorized to use official agency Twitter accounts could face legal jeopardy posting messages they weren't supposed to write, said Stewart Baker, a cybersecurity lawyer and former National Security Agency and Department of Homeland Security official.

"If someone says you may not tweet except in these circumstances, and you tweet in other circumstances, you're exceeding authority," Baker said. He added that some federal courts would examine the security measures in place and could throw out cases where employees weren't clearly violating them.

"It wouldn't surprise me if at this stage a criminal investigation was opened and criminal tools were used to investigate this, even if at the end of the day they decided not to pursue criminal charges," Baker said.

Five most revealing moments from Trump's first interviews as president

A federal law enforcement official, speaking on condition of anonymity because he was not authorized to discuss the matter by name, said he was unaware of any requests from federal agencies to investigate the rogue tweets.

The unauthorized messages posted under official accounts appeared to be dropping off, as the Trump administration regained control over its agency accounts. Over last weekend, immediately after Trump's inauguration, transition staff changed all social media passwords for the Environmental Protection Agency, said Jared Blumenfeld, a former EPA official under the Obama administration who said he was speaking regularly with former colleagues.

Starting Wednesday, scores of unofficial Twitter accounts appeared purporting to represent federal agencies, mocking Trump using the same social media service the president uses daily. At least some were linked to federal employees using work email addresses who inadvertently revealed their involvement.

Twitter users can choose to allow others on the service to find them by searching for their email address. In other cases, Twitter notified users who previously shared their online address books using Twitter's "Find Friends" feature that anonymous accounts were created by federal employees whose work email addresses were already in those address books.