US director of national intelligence James Clapper has announced his resignation, ending a six-year tenure as the top US spy that included a sometimes rocky relationship with Congress.

Clapper, 75, a retired three-star US Air Force general, will stay on until US President Barack Obama leaves office in January. He has said for months he intended to leave when Obama departed and his replacement will be chosen by President-elect Donald Trump.
Clapper's formal letter of resignation was issued in response to a White House request that all Obama administration political appointees submit resignations effective at noon on January 20, a spokesperson for the Office of the Director of National Intelligence said.
"I submitted my letter of resignation last night, which felt pretty good," Clapper said today. "I've got 64 days left."
In March 2013 Clapper found himself at the centre of controversy after testifying that the US government did “not wittingly” collect data on millions or hundreds of millions of Americans.
His statement was disproved months later when former National Security Agency contractor Edward Snowden exposed classified details of US surveillance programs, including one that collected domestic American phone call data in bulk.
Clapper later said his response was the "least untruthful" one he could provide.
The leading candidates to take Clapper's job in the Trump administration include Robert Cardillo, director of the National Geospatial-Intelligence Agency and a previous deputy director of national intelligence under Clapper, according to national security officials and people close to Trump's transition team.
Retired lieutenant-general Ronald Burgess, who headed the Defense Intelligence Agency during Obama's first term, and former Republican representative Pete Hoekstra, who chaired the house intelligence committee, also may be contenders, sources said.
The director of national intelligence oversees 17 US intelligence agencies and serves as the president's principal intelligence adviser and briefer.
As deputy director of national intelligence, Cardillo had served as Obama's "alternate" principal briefer, an official said.