The nation's top spy, Director of National Intelligence James Clapper, has resigned.

Clapper had said for months that he was planning to leave with President Barack Obama and gave notice on Wednesday in a letter formally stating his intent to end his 50-year career in the military and intelligence communities.

'He signed his letter as required by all appointed administration officials but is finishing out his term,' a spokesperson in the Office of Director National Intelligence told CNN.

The Director of National Intelligence, James Clapper, has resigned. He'll leave the post when President Barack Obama's term ends

Clapper told lawmakers today 'it felt good' to submit his letter of resignation. He's seen at a hearing this morning on Capitol Hill

Obama is in the midst of an overseas trip - he's currently in Berlin.

Clapper told lawmakers today 'it felt good' to submit his letter of resignation.

The 75-year-old retired Air Force lieutenant general has held the title of spy chief since he was unanimously confirmed to the position in 2010.

'I have 64 days left, and I'd have a pretty hard time with my wife going past that,' he said.

The DNI Office said on Twitter this morning that Clapper's resignation goes into effect at noon on Jan. 20.

President-elect Donald Trump was already interviewing candidates for top-level security posts in his administration. He'll need to name a National Security Adviser, CIA Director and DNI chief before he takes office in January.

Today he's meeting Nikki Haley, a candidate for secretary of state, and Japanese Prime Minister Shinzo Abe.

Clapper told the House Intelligence Committee Thursday that the 'nation is facing the most diverse array of threats that I've seen.'

'I'm hesitant to pick one,' he said after he was asked to identify the top threat coming over the horizon.

Clapper named Iran, Russia, China and North Korea as nations to watch, CNN reported. He also talked about terrorism and weapons of mass destruction - 'which is personally a growing concern for me' - and 'challenges posed in the cyber dimension.'

Clapper told the House Intelligence Committee Thursday that the 'nation is facing the most diverse array of threats that I've seen'

The intelligence chief accused the Kremlin in October of hacking Democratic Party officials' emails and meddling in the presidential election.

'We believe, based on the scope and sensitivity of these efforts, that only Russia’s senior-most officials could have authorized these activities,' he and Homeland Security Secretary Jeh Johnson said in a joint statement.

Clapper's tenure as DNI chief had its speed bumps. He was accused by members of Congress of perjury and reprimanded for claiming under oath that the United States government does not collect data on its citizens.

'No, sir,' Clapper told a U.S. senator during a hearing. 'Not wittingly. There are cases where they could inadvertently, perhaps, collect, but not wittingly.'

Edward Snowden, the former NSA contractor who disclosed the existence of global and domestic surveillance programs, says Clapper's testimony was 'the breaking point.'

Watching him 'directly lie under oath to Congress,' he said, 'Seeing that really meant for me there was no going back.'