The £189m Library of Birmingham, which houses a collection of one million books, has opened.
The library has more than 200 public access computers, theatres, an exhibition gallery and music rooms.
It was officially opened by Malala Yousafzai, the teenager shot in the head in Pakistan by the Taliban for championing women's rights.
She was treated at Queen Elizabeth Hospital in Birmingham and now lives in the city.
Malala Yousafzai give a speech before the opening
As part of the opening ceremony, Malala placed her copy of The Alchemist by Paolo Coelho in the library - the last book to go on the shelves. She has been given membership to access the archive.
Addressing the public, Malala said she was feeling very proud the building had been designed by a woman and the city was now her second home after her "beloved Pakistan".
She said books were weapons to beat terrorism and "the only way to global peace is reading knowledge and education".
"Books are precious," she explained.
"Some books travel with you back centuries, others take you into the future. Some take you to the core of your heart and others take you into the universe.
"There's no better way to explain the importance of books than to show even God chose the medium of a book to send his message to his people.
A crowd of visitors queued from 09:00 BST in Centenary
Square, eager to get their first glimpse of Birmingham's
Culture Minister Ed Vaizey and the city's lord mayor Mike
Leddy joined Malala Yousafzai and library architect
Francine Houben to officially open the building, while
brass band SuperCritical Mass played inside.
For an hour after the opening, a queue snaked through
the square and Birmingham's library was officially back in
"This library will continue to enlighten future generations.
"It is written that a room without books is like a body without a soul. A city without a library is like a graveyard."
Speaking of how Birmingham has become a home to her, Malala said: "This city is the beating heart of England.
"Birmingham is very special for me, because it was here I found myself alive seven days after I was shot."
She said the "great people" of the city gave her moral support.
"This event proves this city loves me and I love it too."
'Digital and traditional'
The library has been built to replace the previous Central Library, built in the 1970s, and described by Prince Charles as looking like a place where books would be incinerated rather than read.
Library director Brian Gambles, said they were given the go ahead by the council to proceed with the project in October 2007, roughly a year before the financial crisis began.
Most of the funding has come from borrowing, with a small amount from donations and the council raising funds by selling land.
A small group of protesters gathered at the opening ceremony, with some voicing concerns at the amount of money being borrowed and their fears for the impact on local libraries and others collecting signatures for a petition against rumoured plans for the library to be privatised. A banner saying "keep the library public" was briefly unfurled on one of the roof terraces.
Mr Gambles said the building had "echoes of the traditional round reading room with a modern twist".
"A fusion of the digital and the traditional is absolutely essential to the vision of the library we have," he said of the project, which he has led for seven years.
The building also contains the Shakespeare Memorial Room, home to a collection of 43,000 books, including copies of the Bard's First, Second, Third and Fourth Folio editions.
As members of the public queued to get inside the building, 70-year-old Ira John, from Tipton in the Black Country, said the old library "had had its day".
"I used to use the old library all of the time, for languages and transport information," she said.
"There is no comparison between this and the old library; there is so much here.
"The old building had had its day but this is a library for the future."