WASHINGTON (Reuters) - Director of National Intelligence James Clapper announced his resignation on Thursday and said it “felt pretty good” to step down, ending a six-year tenure as the top U.S. spy that included a sometimes rocky relationship with Congress.

Clapper, 75, a retired three-star U.S. Air Force general, will stay on until Democratic 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 Republican 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 Jan. 20, a spokesperson for the Office of the Director of National Intelligence said.

Clapper appeared before the U.S. House of Representatives intelligence committee hearing on Thursday and Representative Adam Schiff, the committee’s top-ranking Democrat, lightheartedly said he hoped Clapper would stay in the job for four more years.

“I submitted my letter of resignation last night, which felt pretty good,” Clapper responded. “I’ve got 64 days left.”

In March 2013 Clapper found himself at the centre of controversy after testifying before the Senate Select Committee on Intelligence that the U.S. 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 U.S. surveillance programs, including one that collected domestic U.S. phone call data in bulk.

Clapper later said his response to the Senate 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.

Slideshow ( 3 images )

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 in contention, sources said.

The director of national intelligence oversees 17 U.S. 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.

Clapper’s service in military and intelligence spanned six decades, beginning in the 1960s in the U.S. Marine Corps followed by enlistment as a U.S. Air Force officer.