BROWNSVILLE, Tex. — Joel Luna was just the kind of job candidate the Border Patrol covets. He grew up on both sides of the border, in Mexico and South Texas. He participated in the Reserve Officers Training Corps in high school and later served in the Army, seeing combat in Iraq.

Mr. Luna joined the agency as part of a hiring surge that began under the George W. Bush administration, patrolling a rural area about 100 miles north of Mexico. But six years later, his decorated career came to a shocking end: He was arrested and charged with helping to send illegal weapons to Mexico and ship drugs into the United States. He was convicted in January and sentenced to 20 years in prison.

Now, as President Trump plans a similar hiring surge at the Border Patrol, Mr. Luna’s case is casting a large shadow. The president wants to make 5,000 new hires, under a streamlined process that critics fear could open a door to other rogue agents like Mr. Luna.

Agency officials, some members of Congress and the Border Patrol union say the current process has made it too hard to hire agents. It typically takes more than a year to vet candidates and get them on the job.