His choice of Mr. Ryan had clear political overtones for Mr. Romney, who despite years of trying to win over the right was still viewed with some suspicion by many conservative leaders. But to the degree that it was a marriage of political convenience, it came about only after the two Republicans engaged in regular, substantive and previously undisclosed exchanges that by this spring had left a skeptical Mr. Ryan convinced that Mr. Romney had come to a similar policy viewpoint. The future No. 2, it turned out, was doing some vetting of his own.

Over the past 18 months, with Mr. Romney emerging as the Republican Party’s presidential nominee, the frequency and intensity of their communication deepened. Mr. Romney turned to Mr. Ryan for detailed consultations on his economic platform. Mr. Ryan made sure his Medicare proposal in the House matched up with what Mr. Romney was offering on the campaign trail.

Mr. Romney recruited several of Mr. Ryan’s top aides as campaign advisers, and the candidate’s staff members asked the congressman to review language in Mr. Romney’s planned speeches and opinion pieces, people close to both men said in interviews.

Mr. Ryan did not shy from offering pointed advice well before he was named running mate: for months, he had urged Mr. Romney to focus his campaign as much on a “a positive vision” as on the shortcomings of the Obama presidency, something Mr. Romney has since emphasized.

“A lot of substance was exchanged between them,” said Tom Rath, a longtime political adviser to Mr. Romney. “Ryan’s name came up very frequently. Those guys who were traveling with Governor Romney would say, ‘Oh, I know he talked to Ryan about this’ or ‘Ryan and he were e-mailing about that.’ ”