WASHINGTON — The Senate has confirmed the longtime head of Baltimore’s library system to be the next Librarian of Congress. She is the first woman and the first African-American to hold the position.

The vote was 74-18 for Carla Hayden on Wednesday. President Barack Obama had nominated Hayden to be the 14th Librarian of Congress in the institution’s 214-year history. He called her milestones on gender and race “long overdue.”

Obama signed a law last year establishing a 10-year term for the Librarian of Congress with an option for reappointment. The position was previously considered a lifetime appointment.

The previous Librarian of Congress, James Billington, was criticized for not keeping up with advances in technology. Billington was appointed by President Ronald Reagan and served for 28 years before stepping down last year.