WASHINGTON — A senior Justice Department lawyer who defended same-sex marriage, President Obama’s health care law and the government’s right to collect bulk phone records has been promoted to the department’s No. 3 position, officials said Friday.

As acting associate attorney general, the lawyer, Stuart F. Delery, will oversee civil rights, antitrust and environmental cases, among other matters, the Justice Department said. He is replacing Tony West, who announced this week that he was leaving the department.

Mr. Delery argued on behalf of the government in the appeals court case that ultimately led to a Supreme Court decision overturning the federal ban on same-sex marriage. If the Supreme Court takes up a case involving state bans on same-sex marriage, Mr. Delery will be expected to play a central role in developing the Justice Department’s strategy on the case.

Attorney General Eric H. Holder Jr. has called gay rights “a defining civil rights challenge of our time,” and Mr. Delery has played a critical role inside the Justice Department on the issue.