Barack Obama has raised for the first time the prospect of new legislation to limit the powers of the NSA, the US spy agency caught up in controversy over the sweep of its surveillance operations.

Answering a question at a joint press conference with Swedish prime minister Frederik Reinfeldt on Wednesday, Obama said there were "legitimate questions" about the NSA. He said existing laws may not be sufficient to deal with advances in technology that have allowed the NSA to gather much more data than before.

There have been calls for new legislation from members of Congress to limit the powers of the NSA, but this is the first time that Obama has hinted he might back such a move. Until now, Obama has only proposed limited changes and is awaiting recommendations from a review body he set up.