WASHINGTON, May 11 — Two years ago, Robin C. Ashton, a seasoned criminal prosecutor at the Department of Justice, learned from her boss that a promised promotion was no longer hers.

“You have a Monica problem,” Ms. Ashton was told, according to several Justice Department officials. Referring to Monica M. Goodling, a 31-year-old, relatively inexperienced lawyer who had only recently arrived in the office, the boss added, “She believes you’re a Democrat and doesn’t feel you can be trusted.”

Ms. Ashton’s ouster — she left the Executive Office for United States Attorneys for another Justice Department post two weeks later — was a critical early step in a plan that would later culminate in the ouster of nine United States attorneys last year.

Ms. Goodling would soon be quizzing applicants for civil service jobs at Justice Department headquarters with questions that several United States attorneys said were inappropriate, like who was their favorite president and Supreme Court justice. One department official said an applicant was even asked, “Have you ever cheated on your wife?”