The New York Public Library has unveiled a new master plan for its flagship building on Fifth Avenue, bringing the long-running, contentious saga of that Beaux-Arts landmark’s renovation for the 21st century closer to an end.

The $317 million plan, approved by the board on Wednesday, will be the largest renovation in the history of the building, which opened in 1911 and is now known as the Stephen A. Schwarzman Building. To be completed in 2021, it includes a new entrance on 40th Street, a new learning center, enlarged exhibition space and additional room for researchers.

In total, it will increase the publicly accessible space in the building by about 20 percent, mostly by opening up and restoring empty or underused historic rooms.