WASHINGTON - Long before President Donald Trump considered declaring a national emergency to free up money for a wall along the southern border, his vice president criticized the idea of the White House making an end run around Congress.

Vice President Mike Pence, speaking on a Republican Governors Association panel in 2014, attacked the idea of using presidential powers to act unilaterally in the face of congressional opposition.

The then governor of Indiana said that "barnstorming around the country defending" such measures was "not leadership." Leadership, he argued, came with negotiating and finding "common ground."

Pence, in his comments, was specifically targeting former President Barack Obama, a Democrat, and the executive orders he announced on Nov. 20, 2014, one day after the conference.

Although the positions were reversed, Obama was also frustrated by a lack of congressional action for what he viewed as a broken immigration system

VIDEO of Pence's comments in 2014.

More:What to know about national emergencies and their role in US history

More:Government shutdown: Trump tours border, claims Democrats 'losing the argument'

More:President Trump could declare a national emergency. But would that get him funds for a wall?

Obama's order shielded up to 5 million immigrants from deportation and bolstered protections for "DREAMers," people who were brought to the U.S. illegally as children . Obama's order followed an impasse with the Republicans in Congress, who during elections that month took control of both the Senate and House. The White House at the time said allow Obama's orders were steps to "fix our broken immigration system."

Republicans blasted Obama for acting unilaterally, and the Supreme Court ultimately struck down the plan in 2016.

Pence said Obama's order was a "profound mistake" and said he didn't believe that the president should be able to "overturn American immigration law with the stroke of a pen."

"I believe that issues of this magnitude should always be resolved with the consent of the governed," Pence said in 2014.

As the White House faces opposition from congressional Democrats, Pence seems to view the situation differently.

“The president believes he has an absolute right to declare a national emergency,” Pence told reporters on Capitol Hill on Thursday. “The president is going to get this done one way or the other.”

Alyssa Farah, press secretary for Pence, said in a statement to USA TODAY about the 2014 comments that the president has "every right" to use his executive powers because Democrats have "refused to negotiate."

"President Trump and the entire White House team have sat down countless times with the Democrat leaders in Congress, who for weeks have refused to negotiate and are holding the government hostage," Farah said. "As the Vice President said in 2014, and countless times during this current shutdown - House and Senate Democrats must be willing to negotiate a solution for the American people."

She continued, saying the shutdown and disagreement over border funds "should be solved through the legislative process. But if Democrats refuse to even negotiate, the President has every right to use his executive powers to protect the American people."

The declaration of a national emergency is different than the executive order Obama used to protect immigrants who entered the country illegally. Experts say the law appears to give wide latitude to declare an emergency and potentially redirect defense money for the wall.

But, at the root of both measures is the use of presidential powers to go around Congress when a deal proved elusive.

National emergencies are usually declared through a proclamation or executive order, which is what Obama used in 2014 for the immigration changes. The measure would allow Trump to unilaterally reprogram money that Congress appropriated for other purposes.

The $5.7 billion Trump has requested to build the wall is at the heart of a disagreement between Republicans and Democrats that has spilled into a now 20-day partial government shutdown.

Since 1976, when Congress passed the National Emergencies Act, presidents have declared at least 58 states of emergency – not counting disaster declarations for weather events, according to the nonpartisan Brennan Center for Justice. Dozens remain in effect, extended by subsequent presidents.

Trump has signed three executive orders that relied in part on the National Emergencies Act, including an order in September that gave him power to slap sanctions on any foreign country that interferes in a U.S. election. That action was taken after criticism that Trump did not do enough to confront Russian meddling in the 2016 presidential election.

Of course, Pence isn’t the only one who criticized Obama for going it alone on immigration. Trump did, too.

“We have a president that can’t get anything done,” Trump told MSNBC in 2016, “so he just keeps signing executive orders all over the place.”

Here are Pence's comments in full on Obama's use of presidential powers on immigration in 2014:

I think it would be a profound mistake for the president of the United States to overturn American immigration law with the stroke of a pen. I truly do. I believe that issues of this magnitude should always be resolved with the consent of the governed and look, the Senate passed a comprehensive immigration bill and the American people changed the majority in the Senate and so, what the president ought to do is precisely what John Kasich just said, and that is the president ought to sit down in January with the new Republican majority in the Senate and the historically large new majority in the House and search for common ground. That's what leadership looks like. That's what we do as governor's every day working with our legislatures, we sit down, we hammer it out. Signing an executive order, giving a speech, barnstorming around the country defending that executive order is not leadership, the likes of which we practice every day. I would implore the president to reconsider this path and to demonstrate the kind of leadership that the American people long to see and that is that this administration would sit down with this newly minted Republican Congress and find genuine common ground, border security, there's a series of piece by piece reforms that I believe could be advanced in this Congress that would be in the longterm interest of the American people.

Contributing: John Fritze, Eliza Collins, William Cummings