Democratic presidential candidate Hillary Clinton on Tuesday said she opposed the Keystone XL pipeline, taking a position after years of declining to answer questions about whether she supported it.

In answer to a question at a campaign event in Iowa, Clinton said, "I think it is imperative that we look at the Keystone Pipeline as what I believe it is: a distraction from important work we have to do on climate change. And unfortunately from my perspective, one that interferes with our ability to move forward with all the other issues. Therefore I oppose it."

She justified her earlier silence on the issue by saying, "I was in a unique position as secretary of state at the start of this process, and not wanting to interfere with ongoing decision-making that the president and Secretary Kerry have to do in order to make whatever final decisions they need. So, I thought this would be decided by now, and therefore I could tell you whether I agree or disagree, but it hasn't been decided, and I feel now I've got a responsibility to you and voters who ask me about this."

Get Breaking News Delivered to Your Inbox

As recently as Thursday, Clinton did not answer a question about whether she supported construction of the pipeline, but for the first time indicated that she would have an answer in short order. "I am putting the White House on notice," she said to reporters. "I'm going to tell you what I think soon."

She had also put the onus on the White House to move, saying, "I have been waiting for the administration to make a decision. I thought I owed them that."

The Keystone pipeline project, which has been pending for more than six years now, would connect the tar sands fields of northern Alberta, Canada to oil refineries on the Texas Gulf Coast. The State Department needs to sign off on the project, since it crosses international lines. And Clinton, as the president's first secretary of state, had started the Keystone review.

Clinton has taken some heat from the left for taking so long to comment. Earlier this year, her 2016 primary opponent Sen. Bernie Sanders said on CBS' Face the Nation that his forceful opposition to the pipeline made him a better Democratic presidential nominee.

After Clinton's remarks Tuesday, Sanders said in a statement, "As a senator who has vigorously opposed the Keystone pipeline from the beginning, I am glad that Secretary Clinton finally has made a decision and I welcome her opposition to the pipeline. Clearly it would be absurd to encourage the extraction and transportation of some of the dirtiest fossil fuel on the planet."

Over the years, the Keystone pipeline has become a symbol of the conflict between liberals and conservatives over energy policy. The project has been left simmering on the back burner while Mr. Obama has touted investments in alternative energy, and Republicans have lambasted the administration's new regulations over fossil fuels.

Earlier this year, the Republican-led Congress to a largely symbolic vote to force the approval of the pipeline, but Mr. Obama -- as expected -- vetoed the bill. While the bill was up for debate, CBS News reviewed the impact the pipeline would have on jobs, gas prices, energy independence and the environment.

Even though the president vetoed the bill to force its approval, his administration could still approve the project -- the veto simply proved that Mr. Obama didn't want Congress to force his hand.

CBS News' Hannah Fraser-Chanpong and Nancy Cordes contributed to this report