Gov. Rick Perry of Texas said on Saturday that as president, he would consider sending American troops into Mexico to help defeat drug cartels and improve border security. He indicated that any such action would be done “in concert” with the Mexican government.

“It may require our military in Mexico working in concert with them to kill these drug cartels and to keep them off of our border and to destroy their network,” Mr. Perry said during a campaign appearance here.

“I don’t know all the different scenarios that would be out there,” he said. “But I think it is very important for us to work with them to keep that country from failing.”