Washington: The US House of Representatives has passed a bill to renew the National Security Agency's warrantless internet surveillance program, overcoming objections from privacy advocates and politicians from both sides of Congress.

The legislation, which passed 256-164 and split party lines, is the culmination of a years-long debate in Congress on the proper scope of US intelligence collection - one fuelled by the 2013 disclosures of classified surveillance secrets by former NSA contractor Edward Snowden.

Senior Democrats in the House had urged cancellation of the vote after US President Donald Trump appeared to cast doubt on the merits of the program, but Republicans forged ahead.

Trump initially said the surveillance program, first created in secret after the September 11, 2001 attacks, had been used against him but later said it was needed.