WASHINGTON (AP) — Did you ever buy porn, sniff glue, have sex in junior high? Exactly how many times?

White House lawyers are scouring a life's worth of information about President Barack Obama's potential picks for the Supreme Court, from the mundane to the intensely personal. In trying to replace the late Justice Antonin Scalia, the president could alter the balance of the court for decades — but only if he can get his nominee through Republicans in the Senate.

Prospective justices are put through the nation's most thorough background check, an invasive process where nothing is off-limits. After all, a surprise dredged up later could scuttle confirmation. So candidates' taxes, writings, childhoods, business dealings, medical histories and, yes, love lives, are all scrutinized for potential red flags.

"The idea that you miss something that later torpedoed the nomination — that's a nightmare," said Jack Quinn, former White House counsel to President Bill Clinton.

Just ask Judge Douglas Ginsburg. Nine days after President Ronald Reagan nominated him for the high court, it was revealed he had smoked marijuana as a law professor at Harvard and he was forced to bow out.

For Obama, who has successfully nominated two justices, the vetting process is even more critical this time as he works to push a nominee through in his final year in office. Already, Republicans are threatening to not even hold a vote. If hearings get mired in a squabble over some late revelation, Republicans could find a fresh rationale for dragging the process out until Obama's term ends in January 2017.

"I am going to present somebody who indisputably is qualified for the seat," Obama said Tuesday.

Traditionally, vetting takes weeks if not months, depending on how many candidates are being checked. But Obama is expected to move as quickly as possible to announce his pick.

The White House was jolted into action after learning of Scalia's death, officials said, summoning administration lawyers over Presidents Day weekend to begin searching for a suitable replacement. Obama, traveling in California, has been working with top advisers on his list while aides feel out senators about their willingness to hold a vote.

Millions of Americans with security clearances or government jobs are asked probing questions about their loyalty, reliability and character in FBI background checks. But for Supreme Court contenders, the inquiry goes far deeper.

Justice Anthony Kennedy sat through 10-plus hours of FBI interviews — and a three-hour session with the attorney general and White House counsel in which all "conceivable no-holds-barred questions were asked," according to a memorandum archived in the Reagan Library.

Among the questions Kennedy was asked: Have you ever engaged in kinky sex? Did you shoplift as a kid? What about any associations with groups like the Ku Klux Klan? Ever abuse a girlfriend? Engage in cruelty to animals? And tell us about sex in college: How often, how many women, and did you ever contract a venereal disease?

Typically, such a deep dive doesn't take place until the "short list" has been winnowed to a few candidates being seriously considered. Some presidents keep a close hold on the names, wary of allowing opponents to start building a case against them. Others have floated potential names through the media to try to gauge the public's reaction.

"I always tell clients that they should think long and hard about whether they want to go through the process at all," said Robert Kelner, a partner at the Covington law firm who advises presidential appointees on Senate confirmation. "You give up any semblance of privacy. Your name may be floated, but then it might become publically known that the White House backed away because of something embarrassing."

In the Obama White House, the investigation has been divided in the past into a "substantive vet" of work-related history, performed by White House and Justice Department lawyers, and the "personal vet," handled by outside attorneys, current and former administration officials said. Memos on each area of inquiry then get melded into a single report for the president and top aides.

Obama, like the four most recent presidents before him, tends to interview his final candidates himself. George W. Bush interviewed five candidates to replace Sandra Day O'Connor before settling on Samuel Alito, according to the Congressional Research Service.

Candidates who have been Senate-confirmed before could be especially appealing to Obama because much of the painstaking work of collecting information is already done. This year's short fuse also works in favor of younger judges whose thinner judicial records mean a shorter paper trail.

After the president's nomination there's a whole new round of questioning — this time by the Senate Judiciary Committee, in questionnaires and finally in televised hearings. Justice Sonya Sotomayor, nominated in 2009, was asked whether anyone in Obama's office had asked her about cases currently before the court. She was also asked to list every opinion she'd authored, every time she'd recused herself and every legal event she'd attended since joining the district court.

All told, Sotomayor's questionnaire response totaled more than 5,000 pages.

Associated Press writers Kathleen Hennessey and Robert Burns contributed to this report.