WASHINGTON (Reuters) - In an abrupt shift, U.S. Senator Ted Cruz endorsed Republican presidential nominee Donald Trump on Friday, saying he is the only candidate who can stop Democrat Hillary Clinton from winning the White House on Nov. 8. “A year ago, I pledged to endorse the Republican nominee, and I am honoring that commitment. And if you don’t want to see a Hillary Clinton presidency, I encourage you to vote for him,” the former Republican presidential candidate said in a lengthy statement. Cruz, a senator from Texas who is a favorite of the conservative Tea Party movement, was one of Trump’s last challengers for the Republican presidential nomination to drop out of the race. When Cruz addressed the Republican National Convention in July in Cleveland, where Trump accepted the nomination, he declined to endorse Trump and was essentially booed off stage by the New York businessman’s supporters. During the heated primary battle, Trump had insulted Cruz’s wife, Heidi, for her physical appearance. His wild suggestion that the senator’s father was linked to President John F. Kennedy’s assassin prompted Cruz to denounce Trump as a “pathological liar.” In July, Trump said, “I don’t want his endorsement.” On Friday he said he was greatly honored to have Cruz backing him. “We have fought the battle and he was a tough and brilliant opponent. I look forward to working with him for many years to come in order to make America great again,” Trump said. Cruz cited the possibility of Democrats taking control of the U.S. Supreme Court as a major reason why he decided to drop his opposition to Trump. Trump earlier in the day released the names of 21 prominent conservatives and said he would pick from this list in nominating a replacement for conservative Justice Antonin Scalia, who died in February. The Senate has refused to take any action on President Barack Obama’s nomination of Merrick Garland, chief judge of the federal appeals court in Washington, to fill the vacancy. One of the names on Trump’s list was that of U.S. Senator Mike Lee of Utah, a key ally of Cruz. Cruz said that for some time he had been seeking greater specificity on Trump’s views toward filling the opening on the court, which is currently deadlocked between four right-leaning and four left-leaning jurists. He said Trump’s list “provides a serious reason for voters to choose to support Trump” and that Lee “would make an extraordinary justice.” Cruz noted his qualms about Trump, saying, “I have struggled to determine the right course of action in this general election.” But in the end, he decided, Trump “is the only thing standing in the way” of a Clinton presidency that he said would be devastating to the United States. 