Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Vice President Mike Pence's decision to walk out of a National Football League game on Sunday when some players knelt during the National Anthem was planned ahead of time, a senior Pence official said Sunday night.

Pence, a former governor of Indiana, flew to Lucas Oil Stadium in Indianapolis so he could watch a ceremony honoring Indianapolis Colts legend Peyton Manning. But he left the arena after about 12 members of the San Francisco 49ers knelt on one knee as the anthem played.

The official, who asked not be named, told reporters Sunday night that Pence was "hopeful" that all of the players would stand.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

While all of the Colts stood for the anthem, "several 49ers did not," the official said. "As he had discussed with the president, when several 49ers players disrespected the flag and the Nation Anthem, the vice president decided to leave the game."

The official wouldn't say when that discussion took place.

The White House issued a statement quoting Pence as saying:

"I left today's Colts game because President Trump and I will not dignify any event that disrespects our soldiers, our Flag, or our National Anthem. At a time when so many Americans are inspiring our nation with their courage, resolve, and resilience, now, more than ever, we should rally around our Flag and everything that unites us. While everyone is entitled to their own opinions, I don't think it's too much to ask NFL players to respect the Flag and our National Anthem. I stand with President Trump, I stand with our soldiers, and I will always stand for our Flag and our National Anthem."

Vice President Mike Pence stands during the playing of the National Anthem before Sunday's game between the Indianapolis Colts and the San Francisco 49ers in Indianapolis. Michael Conroy / AP

Pence also tweeted out the statement and followed it up with a picture of himself and his wife, Karen, standing with their hands over their hearts with the caption, "We were proud to stand — with all our Colts — for our soldiers, our flag, and our National Anthem."

We were proud to stand - with all our @Colts - for our soldiers, our flag, and our National Anthem pic.twitter.com/mkZiKMkPDD — Vice President Pence (@VP) October 8, 2017

The White House sent out the photo in an email alert from the Office of the Vice President.

Trump chimed in on Twitter, writing: "I asked [Vice President Pence] to leave stadium if any players kneeled, disrespecting our country. I am proud of him and [Second Lady] Karen."

I asked @VP Pence to leave stadium if any players kneeled, disrespecting our country. I am proud of him and @SecondLady Karen. — Donald J. Trump (@realDonaldTrump) October 8, 2017

Pence's walkout throws fuel on the fire of the controversy over NFL players' kneeling during the National Anthem. The controversy — which has its origins with the then-49ers quarterback Colin Kaepernick sitting during the anthem in 2016 — was escalated three weeks ago when Trump said at a rally in Alabama: "Wouldn't you love to see one of these NFL owners, when somebody disrespects our flag, to say: 'Get that son of a b---- off the field right now, out. He's fired. He's fired!'"

Trump heightened his demands by calling for fans to boycott the NFL. "You will see change take place fast," Trump tweeted. "Fire or suspend!"

Since then, various teams have taken different actions during the National Anthem, with some teams waiting it out in the locker room, others locking arms and still more players continuing to take a knee.