Rep. Dan Crenshaw, R-Texas, backed out of attending this weekend's National Rifle Association (NRA) annual convention because of his trip to Ukraine, according to his office.

The Texas congressman's office told the NRA on Tuesday morning that he would not be attending the event, where he was scheduled to speak, because "he wouldn't be back in time" from Ukraine, his office told Fox News Digital.

His office maintained that Crenshaw's decision not to attend the convention was made prior to the deadly shooting at Robb Elementary School in Uvalde, Texas, and that it was because he will be in Ukraine for the rest of the week on a trip that "came together pretty quickly."

Salvador Ramos, 18, killed 19 children and two adults at the Texas elementary school Tuesday, making it the deadliest shooting at an elementary school since Sandy Hook in 2012.

Crenshaw and Rep. Brian Fitzpatrick, R-Pa., became the first American lawmakers to visit the U.S. embassy on Tuesday in Kyiv since it reopened last week after shuttering its doors shortly before Russia invaded.

GUN CONTROL ADVOCATES SLAM TRUMP'S APPEARANCE AT NRA MEETING IN TEXAS DAYS AFTER SCHOOL SHOOTING

Rep. Dan Crenshaw at CPAC in 2020

Rep. Dan Crenshaw speaks at the annual Conservative Political Action Conference (CPAC) on Feb. 26, 2020, in National Harbor, Maryland. (Alex Wong/Getty Images)

The two congressmen are scheduled to meet with the mayors of various towns that have been hit during the war, as well as with the Ukrainian ministers of defense, interior and foreign affairs.

REPS. FITZPATRICK, CRENSHAW VISIT UKRAINE IN FIRST TRIP TO US EMBASSY SINCE REOPENING

The NRA's annual meeting, which returned this year following a hiatus during the pandemic, will be held in Houston from Friday to Sunday at the George R. Brown Convention Center. The NRA anticipates tens of thousands of people will attend.

NRA conference

Image of NRA meeting (NRA)

Crenshaw was originally going to speak at the Institute for Legislative Action’s Leadership Forum, where he would have joined leaders such as Govs. Greg Abbott and Kristi Noem, Sens. Ted Cruz and John Cornyn, as well as North Carolina Lt. Gov. Mark Robinson.

CLICK HERE TO GET THE FOX NEWS APP

Former President Trump will also be speaking at the convention, for which he has drawn criticism from gun control advocates.

The NRA did not immediately respond to a request for comment.

Fox News' Ronn Blitzer and Emma Colton contributed to this report.