To understand President Donald Trump’s tight grip on the Republican Party, consider the conversion of Rick Perry.

For the former Texas governor, embracing Trump is a religious experience. He has described the controversial president as the chosen one sent by God. And last Friday, at the Dallas County Republican Party’s Reagan Day Dinner, he gave a similar testimonial.

“I thank God every day that Donald Trump is the president of the United States,” Perry said.

Perry hasn’t always been a fan of Trump.

“Let no one be mistaken Donald Trump’s candidacy is a cancer on conservatism and it must be clearly diagnosed, excised and discarded,” Perry said when the two were rivals for the White House.

But now Perry describes Trump as a great president, lauding his appointment of conservative judges and his stewardship of the economy.

But it wasn’t until recently that Perry fully understood why Trump was president instead of him.

It’s a story about a misunderstood prophecy and the miracle of a grandson. It involves accepting political realities and keeping faith.

It starts in 2011, when Perry learned that a Christian prophet had visions of him and his grandson taking a picture in the Oval Office.

Perry, who been mulling over a presidential bid, was thrilled.

“Let’s go,” Perry said he thought at the time, even though at the time he didn’t have a grandson. “Let’s ride.”

Perry embarked on two campaigns for the White House, never forgetting the prophecy.

His 2012 effort was highlighted by the “oops moment,” when at a debate he couldn’t remember one of the three federal agencies he wanted to cut.

Mitt Romney, now a Utah senator, was the 2012 GOP nominee. That year President Barack Obama won reelection. Also of note, Perry was blessed with a granddaughter, not a grandson.

“I figure she had the dates mixed up,” Perry said of the prophet. “I saddled up again.”

But in 2016 Trump rolled over Perry, Sen. Ted Cruz and others en route to the presidency, leaving Perry to wonder if the prophet knew what she was talking about. During that time his second granddaughter was born.

“I thought maybe this lady is not a prophet,” Perry said at the GOP dinner.

Trump appointed Perry as energy secretary and he became one of the president’s trusted loyalists, so much so that he was ensnared in Trump’s impeachment saga.

Last month, Lev Parnas, as associate of Trump’s personal attorney, Rudy Giuliani, said Perry knew of a pressure campaign to get the Ukrainian government to open a corruption investigation centered on former Vice President Joe Biden.

Perry has denied that he had any knowledge of a Biden connection, which was central to the impeachment case against Trump, who was ultimately acquitted by the Republican-controlled Senate.

For the most part Perry’s tenure as energy secretary was uneventful, compared to others in Trump’s Cabinet.

The longest-serving governor in Texas was also one of Trump’s longest-serving cabinet members. He left his post in December after more than three years.

But what about the prophecy?

Perry now has a grandson, and last September the two of them were at the White House.

“I walked into the Oval Office with my grandson and had a picture taken with President Trump,” Perry said, as the crowd at the Reagan Day Dinner applauded.

At the dinner Republicans honored Perry’s service to the country and Texas. During a sprawling tribute video they credited him with helping make Texas an economic powerhouse, a place to which people and businesses move in dramatic numbers.

In his speech Perry said that Trump, not he, was the best choice for president.

“I know how difficult it is to learn all the intricacies and complexity of what Donald Trump has done, and he's done it better than anybody that I could imagine,” Perry said.

Perry also had a prediction about the 2020 elections.

“Texas is not going to go back and be in the blue column,” he said.

Perry made a similar statement about Dallas County during a 2006 rally. Days later Democrats won every contested countywide race on the ballot.

Democrats hope Perry, like in 2006, is not a prophet.