Vice President Biden apologized to President Obama on Wednesday morning for saying he supported same-sex marriage before the administration had planned to, White House officials said.

Obama said he understood, saying he knew Biden had spoken from the heart, according to the officials.

“The President has been the leader on this issue from day one and the Vice President never intended to distract from that,” Kendra Barkoff, the vice president’s press secretary, said Thursday in a statement.

The apology came the first time Biden and Obama spoke after Sunday, when NBC’s “Meet the Press” broadcast an interview with Biden in which he said he was “comfortable” with men marrying men and women marrying women.

At the time, Obama had yet to publicly endorse same-sex marriage.

On Wednesday, President Obama told ABC’s Robin Roberts that Biden “probably got a little bit over his skis” on the issue.

Administration officials insisted that Obama had reached his own decision earlier this year but said that he told only a small circle of people, numbering roughly six or seven, and made clear to advisers that he wanted to announce his support before the Democratic National Convention in Charlotte, scheduled for the first week of September.

The timeline was sped up, however, by Biden’s comments, the officials said in a briefing with reporters Wednesday at the White House, speaking on the condition that they not be named or quoted.

White House officials learned about Biden’s statement soon after the news program was recorded Friday. They said Obama then decided he wanted to make his position known.

In the interview, Biden said, “Look. I am vice president of the United States of America. The president sets the policy. I am absolutely comfortable with the fact that men marrying men, women marrying women and heterosexual men and women marrying are entitled to the same exact rights, all the civil rights, all the civil liberties. And quite frankly, I don’t see much of a distinction beyond that.”

Immediately after its airing Sunday morning, a Biden spokesman said that the vice president “was saying what the president has said previously — that committed and loving same-sex couples deserve the same rights and protections enjoyed by all Americans, and that we oppose any effort to roll back those rights.

“That’s why we stopped defending the constitutionality of Section 3 of the Defense of Marriage Act in legal challenges and support legislation to repeal it,” the aide said. “Beyond that, the vice president was expressing that he too is evolving on the issue, after meeting so many committed couples and families in this country.”

Obama senior adviser David Axelrod said via Twitter shortly after Biden spoke: “What VP said-that all married couples should have exactly the same legal rights-is precisely POTUS’s position.”