U.S. Solicitor General Donald Verrilli, the lawyer who successfully defended the Affordable Care Act before the Supreme Court, is stepping down from his position.

The Justice Department announced Thursday he will step down on June 24.

After serving in the White House counsel’s office, Verrilli assumed the role of solicitor general in June 2011, which makes him the seventh longest-serving solicitor general. 

Verrilli, 58, made the principal argument in defense of the health law against a major challenge in 2012 and a challenge over subsidies for low-income Americans last year. The 2012 case took place in the midst of Obama's re-election campaign, with the signature domestic achievement of his first term essentially on trial at the Supreme Court.

In a written statement, Obama praised him for “moving America forward” by winning several landmark cases involving same-sex marriage and other issues.

"Thanks to his efforts, 20 million more Americans now know the security of quality, affordable health care; we’re combatting discrimination so that more women and minorities can own their piece of the American Dream; we’ve reaffirmed our commitment to ensuring that immigrants are treated fairly; and our children will now grow up in a country where everyone has the freedom to marry the person they love," Obama said in the statement.

Attorney General Loretta Lynch said Deputy Solicitor General Ian Gershengorn would assume the position of acting solicitor general on June 25.

Gershengorn previously served as special assistant and counsel to the deputy attorney general under Attorney General Janet Reno during the Clinton administration.

While Verrilli was victorious in cases involving same-sex marriage and immigration, he was on the losing end of a 5-4 decision in Shelby County v. Holder, the 2013 decision which ended the requirement that states that historically discriminated against minorities gain federal approval before making changes to their election laws. 

The Associated Press contributed to this report.