WASHINGTON (AP) — The Trump administration’s top Supreme Court lawyer is departing.

Solicitor General Noel Francisco, who defended controversial policies including the president’s travel ban, push to add a citizenship question to the census and decision to restrict service in the military by transgender people, is leaving the job.

Just Monday the high court ruled in a case about LGBT rights that Francisco had argued. The justices ruled against Francisco’s position 6-3, finding that a landmark civil rights law protects gay, lesbian and transgender people from discrimination in employment.

Francisco submitted his letter of resignation Wednesday. He said it is time for him to “return to the private sector and spend more time with my family.” His resignation is effective July 3.