CHICAGO — President Obama on Friday will nominate Mayor Julián Castro of San Antonio to be the secretary of housing and urban development, a White House official said Thursday.

The move was expected, but White House officials had declined to confirm it publicly until Thursday night. In a statement, a White House official called Mr. Castro, 39, a “leader among mayors in terms of implementing housing and economic development programs.”

Mr. Obama will announce the nomination about 3:30 p.m. at the White House, the official said, speaking on background because the announcement has not been made formally.

Mr. Castro’s appointment, if it is confirmed by the Senate, would elevate another prominent Hispanic to the cabinet even as Mr. Obama has struggled to persuade Congress to move forward with an immigration overhaul that many Latinos have been seeking.