LAGOS, Nigeria — In a quarter-century, at the rate Nigeria is growing, 300 million people — a population about as big as that of the present-day United States — will live in a country roughly the size of Arizona, New Mexico and Nevada. In this commercial hub, where the area’s population has by some estimates nearly doubled over 15 years to 21 million, living standards for many are falling.

Lifelong residents like Peju Taofika and her three granddaughters inhabit a room in a typical apartment block known as a “Face Me, Face You” because whole families squeeze into 7-by-11-foot rooms along a narrow corridor. Up to 50 people share a kitchen, toilet and sink — though the pipes in the neighborhood often no longer carry water.

At Alapere Primary School, more than 100 students cram into most classrooms, two to a desk.

As graduates pour out of high schools and universities, Nigeria’s unemployment rate is nearly 50 percent for people in urban areas ages 15 to 24 — driving crime and discontent.

The growing upper-middle class also feels the squeeze, as commutes from even nearby suburbs can run two to three hours.