House Speaker Nancy Pelosi (D-Calif.) speaks during a news conference at the U.S. Capitol on Thursday. (Alex Wroblewski/Bloomberg)

House Speaker Nancy Pelosi on Monday invited President Trump to give his State of the Union address on Feb. 5, putting the president on track to deliver his prime-time speech to a nation still reeling from the longest federal shutdown in history and facing the prospect of a second one next month.

Trump sent a letter to Pelosi (D-Calif.) on Monday evening saying it was his “great honor” to accept her invitation to deliver the address on Feb. 5.

“We have a great story to tell and yet, great goals to achieve!” he said in the letter, which was released by the White House.

Pelosi, who stood firm and got Trump to concede to reopen the government last week without funding for his long-promised U.S.-Mexico border wall, will be seated behind the president as he delivers his speech.

“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 said in a letter to Trump on Monday.

“In our conversation today, we agreed on February 5th,” she added. “Therefore, 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.”

The annual speech to a joint session of Congress had been scheduled for Jan. 29, but Pelosi suggested to Trump that he postpone the address during the partial government shutdown.

In retaliation, Trump canceled a trip by Pelosi and other House Democrats to Afghanistan aboard military aircraft. He later insisted he would deliver the speech, then relented after she said no.

Pelosi spokesman Drew Hammill said the speaker initiated Monday’s phone call with Trump.

The 35-day partial shutdown ended on Friday with Trump agreeing to temporarily reopen the government without any money for his wall. The deal reopened the government through Feb. 15, meaning that Trump will be delivering his address as the threat of a second shutdown looms.

Trump is mulling declaring a national emergency if a bipartisan, bicameral congressional committee does not produce a deal that includes $5.7 billion in border wall funding.

“The president’s commitment is to defend the nation, and he will do it either with or without Congress,” acting White House chief of staff Mick Mulvaney said on “Fox News Sunday.”

Mike DeBonis contributed to this report.