WASHINGTON — President Donald Trump on Monday accepted House Speaker Nancy Pelosi’s invitation to deliver his State of the Union speech on Feb. 5, a week later than originally scheduled because of the partial government shutdown.

“It is my great honor to accept,” Trump said in a letter to Pelosi. “We have a great story to tell and yet, great goals to achieve!”

“It is my great honor to accept,” Trump said in a letter to Pelosi. “We have a great story to tell and yet, great goals to achieve!”

The speech had initially been scheduled for Jan. 29, but Pelosi postponed it amid what turned into a 35-day partial government shutdown over Trump’s demand for border wall funding. It was the first known time that a speaker had rescinded an invitation to deliver the State of the Union.

“When I wrote to you on January 23rd, I stated that we should work together to find a mutually agreeable date when government has reopened to schedule this year’s State of the Union address,” Pelosi wrote. “In our conversation today, we agreed on February 5th.

“Therefore,” she continued, “I invite you to deliver your State of the Union address before a Joint Session of Congress on February 5, 2019 in the House Chamber.”

Pelosi’s office and the White House told The Associated Press that the House speaker and president had spoken by phone Monday afternoon.

The House and Senate still must pass a resolution officially inviting Trump to speak to a joint session of Congress.

Pelosi had postponed the speech, first as a “suggestion” and later, after Trump declared his intent to appear anyway, as a formal rescission. The president then refused to allow her to lead a delegation overseas on the military jets he commands. The president said he was considering an “alternative” plan.

Finally, last Friday, Trump capitulated. All sides agreed to fund the government through Feb. 15 to give negotiators time to discuss border security. And on Monday, Pelosi confirmed the State of the Union was back on — on her schedule.

The Constitution states only that the president “shall from time to time give to the Congress Information of the State of the Union,” meaning the president can speak anywhere he chooses or give his update in writing.

But a joint address in the House chamber, in front of lawmakers from both parties, the Supreme Court justices and invited guests, provides the kind of grand backdrop that is hard to mimic and that this president, especially, enjoys.

Associated Press writer Jill Colvin contributed to this report.