NEW YORK — Oscar Niemeyer, the celebrated Brazilian architect whose flowing designs infused modernism with a new sensuality and captured the imaginations of generations of architects around the world, died Wednesday in Rio de Janeiro. He was 104.
The medical staff at the Hospital Samaritano in Rio, where he was being treated, said that he died of a respiratory infection.
Mr. Niemeyer was among the last of a long line of modernist true believers who stretch from Le Corbusier and Mies van der Rohe to those who defined the postwar architecture of the late 1940s, ’50s and ’60s. He is best known for designing the government buildings of Brasilia, a sprawling new capital carved out of the Brazilian savanna that became an emblem both of Latin America’s leap into modernity and, later, of the limits of modernism’s utopian aspirations.
His curvaceous, lyrical, hedonistic forms helped shape a distinct national architecture and a modern identity for Brazil that broke with its colonial and baroque past. Yet his influence extended far beyond his country. Even his lesser works were a counterpoint to reductive notions of modernist architecture as blandly functional.
‘‘Brazil lost today one of its geniuses,’’ Dilma Rousseff, Brazil’s president, said in a statement Wednesday night. ‘‘Few dreamed so intensely, and accomplished so much, as he did.’’
Allied with the far left for most of his life, he suffered career setbacks during the rule of Brazil’s right-wing military dictatorships of the 1960s and ’70s, and he was barred from working in the United States during much of the Cold War era. As modernism later came under attack for its sometimes dogmatic approach to history, his works were marginalized.
Still, Mr. Niemeyer never stopped working; he churned out major new projects through his 80s and 90s. And as the Cold War divide and architecture’s old ideological battles faded from memory in recent years, a younger generation of architects began embracing his work, intrigued by the consistency of his vision and his ability to achieve voluptuous effects on a heroic scale.
For his part, Mr. Niemeyer never wavered from a conviction that, as he once put it, ‘‘Form follows beauty.’’
Oscar Ribeiro de Almeida Niemeyer Soares Filho was born in Rio de Janeiro on Dec. 15, 1907, one of six children of a typographer and his wife. His father owned a graphic arts business, and a grandfather was a judge on the country’s Supreme Court.
A precocious talent, Mr. Niemeyer was trained at the National School of Fine Arts, where he soon drew the attention of its dean, Lucio Costa. Costa was at the center of a small group of architects working to bringmodernist architecture to Brazil.
The timing was ideal. Costa was then designing the Ministry of Education and Health’s headquarters in Rio, and invited Mr. Niemeyer to join his firm as a draftsman. In 1936, the ministry hired the Swiss-born architect Le Corbusier to contribute ideas for the design. Le Corbusier was already a legend, and the building would become the first major public project by a modernist architect in Latin America.
Mr. Niemeyer’s name soon became synonymous with the new Brazilian architecture. In 1939, he collaborated with Costa on the Brazilian Pavilion for the New York World’s Fair. Three years later, he completed his first house, a simple, modern box resting on slender columns on a mountainside overlooking the magnificent Rodrigo de Freitas lagoon.
In these and other early projects, Mr. Niemeyer was beginning to develop a distinctive architecture of flowing lines, structural lightness, and an open relationship to natural surroundings.
At the same time, he was becoming politically outspoken. Reared in a quiet upper-middle-class Rio neighborhood by his maternal grandparents, Mr. Niemeyer joined the Communist Party.
When the Brazilian government released hundreds of political prisoners, including Communists, as a gesture of good will in the 1940s, Mr. Niemeyer turned over to the party the first floor of his Rio office for use as a headquarters.
Mr. Niemeyer’s international status was confirmed by the Brazil Builds exhibition at the Museum of Modern Art in New York in 1943, a show that also introduced his work to a US audience. Four years later, he joined Le Corbusier again, this time as an equal, when the two were selected to take part in designing the United Nations complex in New York.
Supervised by Wallace K. Harrison, the UN design was a collaboration that also included international luminaries such as Soviet architect Nikolai D. Bassov and Max Abramovitz of New York. The final design was a compromise of sorts between Mr. Niemeyer’s concepts and those of his aging idol Le Corbusier.
Set amid gardens and plazas, the slim, glass-clad Secretariat tower and the sculptural concrete General Assembly building remain testaments to the belief in rationalism as a means to resolve international disputes and disparities.
In his designs for Brasilia, the capital city built in the vast undeveloped lands of the Brazil’s central region, Mr. Niemeyer got the opportunity to create his own poetic vision of the future on a monumental scale.
The city’s cross-shaped master plan, with repetitive rows of housing set around a formal administrative center, was designed by Costa, Mr. Niemeyer’s mentor. But it was Mr. Niemeyer who gave Brasilia its sculptural identity.
The speed with which the city was created, between 1956 and 1960, reinforced its image as a utopian dream that had sprouted magically out of a primitive landscape. Its crisp, abstract forms seemed to sum up the aspirations of much of the developing world: the belief that modern architecture and the faith in technological progress that it embodied could help create a more egalitarian society.
Arranged along a vast, grassy esplanade, Mr. Niemeyer’s buildings acquire a certain grandeur in their isolation. The most spectacular is the Metropolitan Cathedral, a circular, crownlike structure that splays open at the top to let light spill into the main sanctuary.
Yet much of Brasilia’s beauty lay in an architectural balancing act.
The simple twin towers of its secretariat, for example, play off the geometric bowllike forms of the Senate and Chamber of Deputies. The entire complex suggests a world in perfect harmony, even if the politicians and bureaucrats who work there are not.
The languorous sensuality of Mr. Niemeyer’s designs are underscored in early sketches for Brasilia.
They often depict naked young women sunbathing on a vast empty plaza as his buildings recede in the background. It’s an image of romantic alienation that has more in common with the films of Michelangelo Antonioni than with the utopian aspirations of early modernism.
‘‘For me,’’ Mr. Niemeyer said years later, ‘‘beauty is valued more than anything — the beauty that is manifest in a curved line or in an act of creativity.’’
Brasilia was considered his greatest triumph, but he had little time to glory in it. In 1964, after a coup put the country in the hands of a military dictatorship, he was repeatedly questioned by the military police about his Communist associations. Although he was never imprisoned, commissions dried up.
A few years later, he was chosen to design a business center on Claughton Island near Miami. But the United States, still in the grip of the Cold War, denied him a visa. (Around the same time, he also designed a house in Santa Monica, Calif., one he never saw.)
Unable to find work in Brazil, Mr. Niemeyer fled to Europe, where he received commissions to design the Communist Party headquarters in Paris, completed in 1980, and the House of Culture in Le Havre, France (1982), with its low conical dome and a spectacular concrete ramp corkscrewing into the earth.
Modernism was by then falling out of favor with the architectural establishment. Brasilia soon became a symbol of modernism’s failure to deliver on its utopian promises. The vast empty plazas seemed to sum up the social alienation of modern society; surrounded by slums, the monumental government buildings of its center exemplified Brazil’s deeply rooted social inequalities.
Mr. Niemeyer addressed the criticism in a profile by critic Michael Kimmelman in The New York Times Magazine in 2005. ‘‘You may not like Brasilia,’’ he told Kimmelman, ‘‘but you can’t say you have seen anything like it — you maybe saw something better, but not the same. I prefer Rio, even with the robberies. What can you do?’’
He added: ‘‘But people who live in Brasilia, to my surprise, don’t want to leave it. Brasilia works. There are problems. But it works. And from my perspective, the ultimate task of the architect is to dream. Otherwise nothing happens.’’
Mr. Niemeyer leaves his wife, Vera Lucia Cabreira, whom he married in 2006; four grandchildren; 13 great-grandchildren; and six great-great-grandchildren, according to the newspaper O Globo.
A daughter, Anna Maria, died this year at age 82, and his first wife, Annita Baldo, died in 2004, after 76 years of marriage.
Mr. Niemeyer lived long enough to see his international reputation recover and flourish. He returned to Brazil in the early 1980s, and his office was soon overflowing with new commissions.
His Museum of Contemporary Art in Niteroi, near Rio, which opened in 1996, was celebrated for its bold saucer-shaped form, which hovered on a cliffside overlooking Guanabara Bay.
A decade later, on his 99th birthday, he celebrated the opening of his National Museum and National Library along the Monumental Axis in Brasilia, near his cathedral.
In the meantime, a growing number of people had begun to reexamine the legacy of postwar modernism and appreciate his purist vision as a throwback to a more optimistic time.
In celebrating both the formal elements and social aims of architecture, his work became a symbolic reminder that the body and the mind, the sensual and the rational, are not necessarily in opposition. Yet he also saw sensuality and the brightness of dreams against a darker backdrop.
‘‘Humanity needs dreams to be able to survive the miseries of daily existence,’’ he once said, ‘‘even if only for an instant.’’