TAMPA, Fla. — For all the finger-pointing about Clint Eastwood’s rambling conversation with an empty chair on Thursday night, the most bizarre, head-scratching 12 minutes in recent political convention history were set in motion by Mitt Romney himself and made possible by his aides, who had shrouded the actor’s appearance in secrecy.

Mr. Romney privately invited Mr. Eastwood, of “Dirty Harry” fame, to speak after the actor had given him a gravelly, full-throated endorsement at a star-studded fund-raiser at the Sun Valley Resort Lodge in Idaho this summer. “He just made my day. What a guy,” Mr. Romney joked with his donors that night, flanked by the fake log columns of the lodge.

Thus began an effort by Mr. Romney’s campaign over several weeks to inject a Hollywood-style surprise into the highly scripted, tightly controlled convention where Mr. Romney would formally accept the nomination of the Republican Party to be president.

Behind the scenes, Mr. Eastwood’s convention cameo was cleared by Mr. Romney’s top message mavens, Russ Schriefer and Stuart Stevens, who drew up talking points that Mr. Eastwood included, in his own way. They gave him a time limit and flashed a blinking red light that told him his time was up. He ignored both. The actor’s decision to use a chair as a prop was last-minute, and his own.