WASHINGTON  Justice Department officials illegally used “political or ideological” factors in elite recruiting programs in recent years, tapping law school graduates with Federalist Society membership or other conservative credentials over more qualified candidates with liberal-sounding résumés, an internal report found Tuesday.

The report, prepared by the Justice Department’s own inspector general and its ethics office, portrays a clumsy effort by senior Justice Department screeners to weed out candidates for career positions whom they considered “leftists,” using Internet search engines to look for incriminating information or evidence of possible liberal bias.

One rejected candidate from Harvard Law School worked for Planned Parenthood. Another wrote opinion pieces critical of the USA Patriot Act and the nomination of Samuel A. Alito Jr. to the Supreme Court. A third applicant worked for Senator Hillary Rodham Clinton and another posted an unflattering cartoon of President Bush on his MySpace page.

Another applicant, a student at the top of his class at Harvard who was fluent in Arabic, was relegated to the “questionable” pile because he was a member of the Council on American-Islamic Relations, a group that advocates civil liberties. And another rejected candidate said in his essay that he was “personally conflicted” about the National Security Agency’s program of wiretapping without warrants.