WASHINGTON — Carla D. Hayden, the longtime head of Baltimore’s library system and an advocate for the privacy rights of library users, was nominated by President Obama on Wednesday to lead the Library of Congress.

If confirmed by the Senate, Dr. Hayden, 63, would be the first woman and the first African-American to hold the position, overseeing one of the world’s leading repositories of knowledge and culture and setting the agenda for the nation’s libraries.

She would also take the reins during a tumultuous period for the 216-year-old library, which has been without a permanent leader since September and has come to be seen as falling behind other leading libraries around the world, especially in its digital collections.

“Dr. Hayden has devoted her career to modernizing libraries so that everyone can participate in today’s digital culture,” Mr. Obama said in a statement. “She has the proven experience, dedication and deep knowledge of our nation’s libraries to serve our country well, and that’s why I look forward to working with her in the months ahead.”