“I could have not worked with the president if I put my feelings ahead of Texas,” Cruz said.
Cruz is running in a tight race against Beto O’Rourke, a Democratic congressman from El Paso who has galvanized national liberal circles as he tries to become Texas' first Democrat to win statewide office since 1994.
Despite being bitter enemies during the 2016 election, Cruz, 47, has embraced President Trump in his re-election campaign.
The president tweeted Friday, "Beto O'Rourke is a total lightweight compared to Ted Cruz, and he comes nowhere near representing the values and desires" of Texans.
That came two days removed from the president tweeting that O'Rourke was a "flake" after the Democrat used a debate to borrow a Trump nickname for Cruz while both were bitter rivals during the 2016 Republican presidential primary, "Lyin' Ted."