WASHINGTON - The beginning of the end came for CIA Director David Petraeus when Paula Broadwell, his biographer with whom he was having an affair, ‘or someone close to her had sought access to his email’, according to the Wall Street Journal’s description of an FBI probe.

The investigation began when someone reported suspicious emails allegedly from Broadwell, a younger married woman, to the FBI. The agency then determined that she allegedly had emailed a number of government employees, according to media reports. The FBI was at one point trying to determine whether any of the employees were being stalked.

The name of 40-year-old Ms Broadwell’s burst into public view on Friday evening after Petraeus resigned abruptly amid an FBI investigation that uncovered evidence of their relationship.

Broadwell was the valedictorian of her high school class and homecoming queen, a fitness champion at West Point with a graduate degree from Harvard, and a model for a machine-gun manufacturer.

It may have been those qualities — and a string of achievements that began in her native North Dakota, where she was state student council president, an all-state basketball player and orchestra concertmistress — that drew the attention of Petraeus, the nation’s top spy and a four-star general, as the two spent hours together for a biography of Petraeus that Ms Broadwell co-wrote, according to The New York Times.

But Ms Broadwell was hardly shy about her interactions with Petraeus as she promoted her book, ‘All In: The Education of General David Petraeus’, in media appearances earlier this year. She had unusual access, she noted in promotional appearances, taping many of her interviews for her book while running six-minute miles with Petraeus in the thin mountain air of Kabul, the Afghan capital.

Broadwell told Fox News earlier this year when talking about the biography that she met the general when she was post-graduate student at Harvard and he came to the university to speak.

They kept in touch via email and ran into each other again when she came to Washington, Broadwell said on Don Imus’ Fox Business show. “He gave me his card,” said Broadwell, who co-wrote the book. “We kept in touch.”

Broadwell also called Petraeus’ wife of 38 years, Holly Petraeus, ‘a wonderful military spouse’.

Source said the FBI investigation ended when the agency determined no criminal acts had been committed.

FBI spokesman Paul Bresson has declined to comment on the information that the affair had been discovered in the course of an investigation by the agency. Petraeus, who turned 60 on Wednesday, met his wife when he was a cadet at the US Military Academy at West Point, NY. She was the daughter of the academy superintendent. They have two children, and their son led an infantry platoon in Afghanistan.

Holly Petraeus also works in the Obama administration, for the Consumer Financial Protection Bureau.

Petraeus met with President Obama on Thursday before submitting his letter of resignation, which the president accepted. In a message to staff, Petraeus said he asked ‘to be allowed’ to step down.

“After being married for over 37 years, I showed extremely poor judgment by engaging in an extramarital affair. Such behaviour is unacceptable, both as a husband and as the leader of an organisation such as ours,” the retired four-star general said. “This afternoon, the President graciously accepted my resignation.”

The move comes amid the unfolding controversy surrounding the attack on the US Consulate in Libya. Scrutiny has fallen on a range of agencies including the CIA, and the director had been set to testify at hearings next week - he is no longer expected to do so. But Petraeus, in his resignation message, cited strictly ‘personal reasons’ surrounding the affair.

Obama, in a written statement, said Petraeus provided an ‘extraordinary service to the United States for decades’. “By any measure, he was one of the outstanding General officers of his generation, helping our military adapt to new challenges, and leading our men and women in uniform through a remarkable period of service in Iraq and Afghanistan, where he helped our nation put those wars on a path to a responsible end,” Obama said. The White House has named Michael Morell, the agency’s deputy director, to serve as acting director.

The decision abruptly ends the public-service career of one of the military’s most vaunted leaders. He led the surge in Iraq, and was later tapped to lead US and NATO forces in Afghanistan - following two years at the helm of US Central Command. In April 2011, Obama again tapped Petraeus to lead the CIA.

He leaves just three days after Obama was elected to a second term, and amid a challenging environment for the country’s intelligence community - which is dealing with not just rogue nations like Iran, but a changing landscape elsewhere as a result of the Arab Spring. It has been confirmed that the US compound that was attacked in Libya housed CIA operatives as well as State Department staff.

The intelligence community subsequently came under scrutiny when some officials suggested the administration initially claimed the attack was ‘spontaneous’ only because of the intelligence assessments at the time.

Director of National Intelligence James Clapper said Friday that Petraeus’ resignation ‘represents the loss of one of our nation’s most respected public servants’.

Lawmakers on Capitol Hill expressed similar sentiments.

“General David Petraeus will stand in the ranks of America’s greatest military heroes. His inspirational leadership and his genius were directly responsible - after years of failure - for the success of the surge in Iraq,” Republican Senator John McCain said. “General Petraeus has devoted his life to serving the country he loves, and America is so much better for it