Barack Obama has offered his most vigorous public defence of drone strikes, describing them as legal, effective and necessary.

The US president's remarks came as he sought to move America beyond the war effort of the past dozen years, defining a narrower terror threat from smaller networks and home-grown extremists, rather than the grandiose plots of Osama bin Laden's al Qaida.

"Neither I, nor any president, can promise the total defeat of terror," he said in a speech at Washington's National Defence University.

"What we can do - what we must do - is dismantle networks that pose a direct danger and make it less likely for new groups to gain a foothold, all while maintaining the freedoms and ideals that we defend."

Mr Obama also implored Congress to close the much-criticised Guantanamo Bay detention centre in Cuba and pledged to allow greater oversight of the controversial unmanned drone programme. But he plans to keep the most lethal efforts with the unmanned aircraft under the CIA's control.

It is an awkward position for the president, a constitutional lawyer, who took office pledging to undo policies that infringed on Americans' civil liberties and hurt the US image around the world.

"Now is the time to ask ourselves hard questions - about the nature of today's threats and how we should confront them," Mr Obama said.

His address came amid increased pressure from Congress on both issues. A rare coalition of bi-partisan politicians has pressed for more openness and more oversight of the highly-secretive targeted drone strikes.

Liberals have pointed to a hunger strike of more than 100 prisoners at Guantanamo - the military was earlier this month force-feeding 32 of them -.in pressing for stalled efforts to close the jail to be renewed.

The president cast the drone programme as crucial in a counter-terror effort that will rely less on the widespread deployment of US troops as the war in Afghanistan winds down. He said he was deeply troubled by the civilians unintentionally killed.

"For me, and those in my chain of command, these deaths will haunt us as long as we live," he said. Before any strike "there must be near-certainty that no civilians will be killed or injured - the highest standard we can set".

In Pakistan alone, up to 3,336 people have been killed by drones since 2003, according to the New America Foundation, which maintains a database of the strikes. However, the secrecy surrounding the programme makes it impossible for the public to know for sure how many people have been killed and how many were intended targets.

The Justice Department revealed for the first time on Wednesday that four US citizens had been killed in American. drone strikes abroad. Just one was an intended target - Anwar al-Awlaki, who officials say had ties to at least three attacks planned or carried out on US soil.

The other three Americans, including al-Awlaki's 16-year-old son, were unintended victims.

Some Republicans criticized Mr Obama as underestimating the strength of al Qaida and for proposing to repeal the president's broad authorisation to use military force against the nation's enemies - powers granted to George Bush after the September 11 2001 attacks.

"I believe we are still in a long, drawn-out conflict with al Qaida," Senator John McCain, a top opposition Republican, said.

"To somehow argue that al Qaida is on the run comes from a degree of unreality that to me is really incredible. Al Qaida is expanding all over the Middle East, from Mali to Yemen and all places in between."

Mr Obama announced new "presidential policy guidelines" on the standards his administration uses when deciding to launch drone strikes.

According to an unclassified summary, the US will not strike if a target can be captured, either by the US or a foreign government; a strike can be launched only against a target posing an "imminent" threat, and the US has a preference for military control of the drone programme.

The CIA will continue to work with the military on the programme in Yemen and control the programme in Pakistan, given the concern that al Qaida may return in greater numbers as US troops leave Afghanistan.

The guidelines will apply to strikes against both foreigners and US citizens abroad.

Drone strikes will largely remain highly secret for the public. Congress has been briefed on every strike that drones have made outside Afghanistan and Iraq, Mr Obama said, but those briefings are largely classified.