Image caption The Secret Service protects the lives of the president, vice president and their families

A US Secret Service agent assigned to President Barack Obama's security detail has died in an apparent suicide, law enforcement sources have said.

Special agent Rafael Prieto was being investigated for failing to report a romantic relationship with a foreign national, they told US media.

The agency said it was "mourning the loss of a valued colleague".

The behaviour of its agents have been under scrutiny since a prostitution scandal in Colombia earlier this year.

A number were dismissed after allegations that Secret Service agents hired prostitutes while they were in Cartagena last April to prepare the way for President Obama's visit to attend the Summit of Americas.

Agents are required to inform the Secret Service of any relationship with a foreign citizen to ensure there is no risk to national security.

'Distinguished career'

Rafael Prieto, a married father, admitted to investigators that he had been having a long-term affair with a woman from Mexico, sources told the Associated Press news agency.

His relationship was revealed by an agent involved in the Cartagena scandal who was concerned that the Secret Service was not enforcing its rules consistently, the AP reported.

It is not thought that he had compromised national security with his relationship, but rather violated the agency's own administrative rules by failing to disclose it.

Mr Prieto is said to have been found on Saturday, in his car with the engine running. His death, believed to have been caused by carbon monoxide poisoning, is being investigated by the Metropolitan Police in Washington.

"Rafael Prieto had a distinguished 20-year career with the Secret Service that was marked by accomplishment, dedication and friendships," agency spokesman Edwin Donovan said in a statement.

"The Secret Service is mourning the loss of a valued colleague."

The Secret Service comprises plain-clothed agents, who directly guard the president, vice-president and their families, and uniformed officers who perform support services.

Following the Cartagena scandal, the agency issued a tighter code of conduct for agents travelling overseas, including a ban on drinking while on duty, visiting "disreputable establishments" and bringing foreigners into hotel rooms.