The bitter rivalry is finally coming to an end.

After months of withholding his support for his party’s presidential nominee, Texas Sen. Ted Cruz gave his endorsement to Donald Trump in a Facebook post Friday.

“This election is unlike any other in our nation’s history. Like many other voters, I have struggled to determine the right course of action in this general election,” Cruz wrote on the social media platform. “After many months of careful consideration, of prayer and searching my own conscience, I have decided that on Election Day, I will vote for the Republican nominee, Donald Trump.”

Get Breaking News Delivered to Your Inbox

Cruz outlined two reasons for his shift.

“First, last year, I promised to support the Republican nominee. And I intend to keep my word,” he said, referring to a Republican loyalty pledge he signed during the GOP primaries.

His second reason: “Even though I have had areas of significant disagreement with our nominee, by any measure Hillary Clinton is wholly unacceptable,” he said. Cruz said six policy issues informed his decision, including where Clinton would fall on the Supreme Court, health care, energy, immigration, national security, and internet freedom. Cruz cited Trump’s recently released “very strong list of potential Supreme Court nominees” as a commitment that “matters” and “provides a serious reason for voters to choose to support Trump.”

“Hillary Clinton is manifestly unfit to be president, and her policies would harm millions of Americans. And Donald Trump is the only thing standing in her way,” Cruz wrote. “And if you don’t want to see a Hillary Clinton presidency, I encourage you to vote for him.”

Cruz’s concession comes after a contentious Republican primary, where Trump launched a vitriolic, no-holds-barred offensive on Cruz and his family.

Over the course of the candidates’ campaigns, Trump had threatened to “spill the beans” on Cruz’s wife, tweeted out an unflattering photo of her, tied Cruz’s father of President John F. Kennedy’s assassin, and questioned the Texas senator’s citizenship and qualifications for the White House.

Cruz, in turn, has fired off insult after insult at Trump, calling him “kooky,” a “snivelling coward,” “pathological liar,” a “big, loud New York bully,” and a “small and petty man.”

Cruz, when invited to address the Republican National Convention in Cleveland in July, refused to back Trump even as he spoke from the convention stage, giving a passive-aggressive non-endorsement calling for Americans to “vote your conscience” -- to loud boos and jeers from the audience.

At the time, Trump had brushed off the snub as “no big deal” on Twitter.

Earlier this week, Republican National Committee (RNC) chair Reince Priebus told CBS’ “Face the Nation” that the party could penalize those former GOP candidates who didn’t support Trump.

“Those people need to get on board,” Priebus said Sunday. “And if they’re thinking they’re going to run again someday, I think that we’re going to evaluate the process – of the nomination process and I don’t think it’s going to be that easy for them.”

On Friday, Trump also released an expanded list of possible Supreme Court candidates he would nominate to replace the late conservative Justice Antonin Scalia. In a move widely seen as an attempt to appeal to the pro-Cruz faction of the Republican party, Trump even included Utah Sen. Mike Lee -- Cruz’s closest ally in the Senate -- as a potential nominee.