Emails from Hillary Clinton's time as secretary of state show she tried to spread the practice of fracking to other countries, although now she is making campaign promises to allow communities to ban the practice.

Fracking, or hydraulic fracturing, is the process of injecting water and other chemicals into layers of shale rock to release oil and natural gas trapped within and is widely credited with sparking a boom in U.S. energy production in the last decade. Clinton was the nation's top diplomat at the time, and emails uncovered by The Intercept show she tried to get other countries to use the same method.

The emails show Clinton's State Department touted fracking to foreign diplomats during a trip to Pennsylvania and attempted to pressure Poland into letting U.S. oil companies begin fracking in that country. The push backfired and Poland banned the practice.

The emails show the State Department wanted to export fracking to reduce coal use in foreign countries, mostly in Europe but also in places such as China and India where coal power is prevalent.

Critics say the emails run contrary to Clinton's message as promoting a clean energy future based on renewable power and her promise in a New York campaign ad to stand with communities that want to ban fracking.

In presidential primary debates, Clinton has equivocated on her position on fracking. While promising to reduce carbon dioxide emissions and reducing the effects of climate change, she has also said she believes natural gas is a necessary part of the country's energy future.

In a presidential debate in March, Clinton said she supports fracking if companies meet certain conditions. However, her conditions would be stringent enough that many companies wouldn't be able to meet them, she said.

She defended her position in an April debate in New York, which has banned fracking. She added that her position as secretary of state was to export fracking to undermine coal use and Russian energy power.

"I don't think I've changed my view on what we need to do, which is to go from where we are when the world is heavily dependent on coal, and oil, but principally coal to clean, renewable energy," Clinton said. "And, one of the bridge fuels is natural gas."

Many environmentalists wish to see all natural gas and other fossil fuels left in the ground to stop the effects of climate change, which many scientists blame on the burning of fossil fuels and the subsequent release of greenhouse gases into the atmosphere.

Clinton's primary opponent, Sen. Bernie Sanders of Vermont, has been very clear in his opposition to fracking throughout the campaign.