A U.S. Customs and Border Protection helicopter crashed in a residential area during a routine patrol along the Mexican border Tuesday, killing the pilot and critically injuring another person onboard.

The helicopter slammed into a yard and hit a pickup truck.

The pilot and passenger, who was a Border Patrol observer monitoring the area for illegal activity, were taken by ambulance to a hospital, Senior Border Patrol Agent Patrick Berry said. No one on the ground was hurt.

A witness to the crash about 10 miles east of El Paso said the helicopter appeared to be coming from New Mexico when it suddenly started having trouble.

"They were flying along real good, then there was a snapping, popping noise," said Wayne Weaver, 47. "You could hear a light hum, then like a thunk." Then the helicopter disappeared and he heard a "boom," Weaver said.

The Federal Aviation Administration is investigating.