WASHINGTON — The hostilities flaring between Mitt Romney and Gov. Rick Perry of Texas have been steadily rising inside both camps and may signal a new, more combative phase in the Republican presidential campaign.

The harsh exchanges between the men at a debate in Las Vegas this week made clear the differences — in style and substance, background and belief — facing voters as they get closer to selecting the party’s nominee. Mr. Romney and Mr. Perry have been on a collision course for months, since Mr. Perry began considering a run for the presidency.

But the animosities began long ago, set off by a series of political encounters that began when the two men were governors — Mr. Romney in Massachusetts — fighting over the services of a political consultant.

The story of their political relationship starts with two ambitious men whose life stories led them to the statehouse. But the similarities in their careers have always been outweighed by the differences, and by the moments of personal and professional conflict.