A veteran Border Patrol agent tried to protect a child molestation suspect, used government computers to sidetrack an investigation and harassed the alleged victim's father, federal prosecutors allege in a complaint released Friday.

Supervising Agent Martin Rene Duran was arrested Thursday at the Otay Mesa Port of Entry on suspicion of eight felonies, including using his government position to create false entries in a government database and civil rights violations.

Prosecutors say Duran was trying to protect his brother-in-law, who was suspected of molesting an 11-year-old boy in Tijuana.

Duran allegedly interfered with that sex crimes investigation by harassing the boy’s father and pressuring him to stop cooperating with the investigation.

According to the criminal complaint, the boy’s father is a legal U.S. resident with no criminal background. But on five different occasions in 2013, Duran allegedly caused the man to be sent to secondary inspection and detained for hours.

Prosecutors say Duran also entered false alerts about the man in a database that helps U.S. agents screen border crossers.

Duran’s false alerts indicated that the man was “known to carry firearms” and that he was “associated with recent threats to (Customs and Border Protection) personnel,” according to the complaint.

The man, who is identified only by the initials “R.C.” in the criminal complaint, was a frequent border crosser. Because of the false alerts, he was repeatedly detained by Customs and Border Protection officers, sometimes at gunpoint.

Prosecutors say on one occasion, “R.C.” and his wife were ordered out of their vehicle, handcuffed, separated from their children and put in a holding cell for almost two hours before being released.

“This type of corruption is in a category all by itself,” said U.S. Attorney Laura Duffy. “When an officer turns on those he is supposed to protect and uses his significant power against law-abiding people who had faith in him, it’s a special kind of betrayal.”

Duran is charged with five counts of unlawfully causing the detentions while acting under color of law, which deprived “R.C.” of his rights to liberty and freedom from unreasonable searches. Duran also faces three counts of falsification of records and obstruction.

The accused child molester, Raymundo Estrada Figueroa, is charged with two counts of traveling from the U. S. to Mexico to engage in illicit sexual conduct. One count is related to the alleged sexual abuse of “R.C.’s” son; the other is connected to the alleged abuse of that boy’s half-brother.

Both defendants are being held without bail in the federal jail in San Diego.