CIUDAD JUAREZ, Mexico (Reuters) - Mexico is demanding answers from Washington over the fatal shooting of a teenager by a U.S. border patrol agent and has sent a formal complaint over the incident, Mexico’s foreign minister said.

Slideshow ( 7 images )

At a wake on Wednesday, grieving relatives wept over the body of Sergio Hernandez, shot on the Mexican side of the border in the frontier city of Ciudad Juarez as he and other youths were running from U.S. border patrol agents.

The death of the teenager has sparked outrage in Mexico, where many already bristle at the way Mexican immigrants doing menial jobs are treated in the United States.

“We have sent diplomatic letters of complaint to the U.S. federal government insisting on an exhaustive investigation,” Foreign Minister Patricia Espinosa told a news conference.

“We are using all the resources available to us.”

The U.S. Federal Bureau of Investigation has opened an investigation into the shooting, which State Department spokesman P.J. Crowley called a “tragic incident.” The border agent has been put on leave.

At the same time, Crowley suggested the shooting might have been justified. The FBI said Hernandez was in a group of illegal immigrants trying to sneak into the United States and when two of them were detained, the teen and another individual began throwing rocks at the border patrol agents.

“I would just caution on this particular incident ... Any law enforcement officer has the right of self-defense if people are taking up arms or (throwing) rocks against them,” Crowley told reporters in Washington.

Espinosa said it was not clear if the youths, who were under a bridge border crossing a few meters into Mexican territory, had attacked the agents.

Tensions between the major trading partners have been fanned by the state of Arizona’s decision to crack down on illegal immigrants.

Mexico has slammed the Arizona law and human rights groups are using Hernandez’s death as a platform to talk about the dangers faced by migrants who cross the border each year.

“This shooting across the border appears to have been a grossly disproportionate response and flies in the face of international standards, which compel police to use firearms only as a last resort,” Susan Lee, Americas director at Amnesty International, said in a statement.

Amnesty said that in recent days a Mexican immigrant who was being deported died after a U.S. border patrol agent used a stun gun on him.

Hernandez’s father said high-tech security at the border, including security cameras, should help U.S. authorities solve the case.

“They saw what happened. They have the video. They have the proof,” Jose Hernandez said at the wake, where the youth’s body lay in a white coffin, dressed in a blue soccer outfit. “With the technology they use to detect people (crossing), they can see who is guilty.”