DALLAS — President Obama on Wednesday directly challenged Gov. Rick Perry of Texas to rally Republicans in support of a $3.7 billion emergency measure aimed at solving the humanitarian crisis caused as thousands of Central American children have crossed the Mexican border.

The president described a frank exchange with Mr. Perry, who has been one of his most vocal critics, after their private meeting aboard the presidential helicopter and then at Dallas Love Field.

The meeting was hastily negotiated as the border crisis came to shadow Mr. Obama’s previously planned trip to Texas and Colorado to raise campaign money and talk about an improving economy.

The president said the emergency aid would address Republicans’ calls for increased border security while also providing care for the thousands of unaccompanied children who have been detained in the Rio Grande Valley. Mr. Obama suggested that election-year political maneuvering was blocking the package because Republicans see the crisis as a way to damage him and his party.