Image caption The device did not contain metal, which would make it difficult to detect in an airport security check

The man who foiled a Yemen-based al-Qaeda "underwear bomb" plot was a British man of Middle Eastern origin, according to US media.

UK officials declined to comment on the reports, but earlier this week the US said foreign agencies were involved in the operation.

The agent was sent by al-Qaeda to attack a US-bound plane, but left Yemen and gave the device to US intelligence.

The US insists the bomb never posed a threat to the public.

Western passport-holders have long been seen as prime targets for militant groups seeking to plan attacks.

However, as well as reporting that the secret agent was a British citizen, NBC News in the US also says UK intelligence agencies were "heavily involved" in his recruitment.

The BBC's Paul Adams, in Washington, says it is unorthodox for intelligence agencies to disclose details about each others' operations.

If true, the revelations about the undercover agent could raise eyebrows in UK intelligence agencies, he adds.

The US is conducting an inquiry into the leak of information, which Defence Secretary Leon Panetta said could hamper intelligence gathering.

"When these leaks take place, I can't tell you how much they damage our ability to be able to pursue our intelligence efforts," Mr Panetta told reporters at the Pentagon.

'Custom fit'

Details of the operation have emerged over the course of this week.

US intelligence learned in April of a plot by al-Qaeda in the Arabian Peninsula (AQAP), based in Yemen.

The group planned to attack a US-bound plane with a sophisticated bomb hidden in a passenger's underwear, an updated version of a 2009 device that evaded airport security.

Officials have described the bomb as a "custom fit" device that would have been hard to detect in airport security checks.

It was said to have two forms of detonator and no metal parts, making it more sophisticated than the device that failed to explode on Christmas Day 2009.

It then emerged that the would-be bomber was an undercover agent who had been recruited to infiltrate the group.

When he was dispatched by al-Qaeda to undertake the suicide mission, the agent left Yemen with the bomb and delivered it to the CIA.

The agent is now reported to be safe in Saudi Arabia while FBI analysts in the US are studying the device.

USS Cole link killed

Experts quoted in the US media say both the 2012 and 2009 bombs bear the hallmarks of AQAP master bomb-maker Ibrahim Hassan Tali al-Asiri.

His name has also been linked to a plot in October 2010 to bomb a Chicago-bound plane using a device disguised as a printer cartridge. That plan, which AQAP claimed as its own, was also foiled with the help of the Saudi authorities.

The undercover agent is also reported to have provided intelligence that led the CIA to conduct a drone strike in Yemen on Sunday that killed AQAP leader Fahd al-Quso.

Quso was wanted in connection with the bombing of the American destroyer USS Cole in Yemen 12 years ago. The US was offering a $5m (£3.1m) reward for information leading to his capture or death.

In a separate development on Tuesday the Pentagon said the US had restarted military training with security forces in Yemen, which had been put on hold because of political unrest.