Architect and creator of Brazil's capital, Brasilia.

Born: December 15, 1907; Died: December 5, 2012.

Oscar Niemeyer, who has died aged 104, was the legendary architect who designed Brazil's modernist capital Brasilia and whose love of the curve and battle against the straight line left its mark on cities all over the world.

Built from nothing in a wild part of Brazil over just four years in the late 1950s, Niemeyer's Brasilia immediately become a symbol of a new futuristic design. The Russian cosmonaut Yuri Gagarin once flew over the city and said it was like arriving on another planet.

In everything Niemeyer did – from Brasilia's crown-shaped cathedral to the undulating French Communist Party building in Paris – he shunned the steel-box structures of many modernist architects, finding inspiration in nature's crescents and spirals. In his memoirs, he said that right angles did not attract him. "What attracts me are free and sensual curves," he said. "The curves we find in mountains, in the waves of the sea, in the body of the woman we love."

This love of curves found greatest expression in Brasilia but his famous creations also include much of the United Nations complex in New York and the Museum of Modern Art in Niteroi, which is perched like a flying saucer across Guanabara Bay from Rio de Janeiro.

In Brasilia, Niemeyer designed most of the important buildings, while French-born, avant-garde architect Lucio Costa crafted its distinctive plane-like layout. Niemeyer left his mark in the flowing concrete of the cabinet ministries and the monumental dome of the national museum.

As the city grew to two million, critics said it lacked soul as well as street corners; the art critic Robert Hughes called it a utopian horror. But Niemeyer shrugged off such criticism. "If you go to Brasilia you might not like it, say there's something better, but there's nothing just like it," he said in an interview in 2006 at the age of 98. "I search for surprise in my architecture. A work of art should cause the emotion of newness."

Oscar Niemeyer Soares Filho was born in Rio de Janeiro and earned his architecture degree at Rio's School of Fine Arts. Working in Costa's office in 1936, he helped design a Rio education ministry building that was a classic of functionalist horizontal and vertical lines. With modernist giant Le Corbusier, Niemeyer developed the brise soleil, a heat protector that enhanced the building's grid design and became an architectural standard in the 1960s.

He teamed up again with Le Corbusier in 1947 to work on the UN complex in New York. After months of squabbling with architects, most notably Le Corbusier, Niemeyer came up with the final plan for the complex, including the Secretariat, General Assembly and conference buildings and the Dag Hammarskjold Library.

But Niemeyer was already chafing at the limits of form-follows-function architecture. His first solo project was the Pampulha complex of buildings set on an artificial lake in the central Brazilian city of Belo Horizonte, now Brazil's third-largest metro area. For the first time, he employed the curves and arches that would become his hallmark.

He was given the Brasilia commission in the 1950s when President Juscelino Kubitschek asked him to design a new capital on Brazil's empty central high plains. Costa became the project's urban planner.

With the slogan of "50 years in five", Kubitschek hoped to prod Brazil into a great leap forward and Niemeyer rose to the challenge, testing new forms and technical limits for reinforced concrete. His cone-shaped Metropolitan Cathedral is a circle of curved concrete pillars set like tepee poles with glass mosaic in between.

"I didn't want an old-style cathedral – dark, a reminder of sin," he said in an interview in the 1990s. "I wanted something happier."

After a 1964 coup plunged Brazil into a 21-year military dictatorship, Niemeyer, a lifelong communist, went to live in France where he designed the headquarters of the French Communist Party.

During the dictatorship he also designed the centre of the Mondadori publishing house in Italy, Constantine University in Algeria and other projects in Israel, Lebanon, Germany and Portugal.

Even late in life, Niemeyer was striving for renewal. In 2009 he came under heavy criticism for proposing to build a Plaza of Sovereignty in the heart of Brasilia.

Preservationists said the 330ft obelisk he envisaged would mar the very skyline the architect created half a century earlier. Niemeyer relented on the plaza, only to unveil new plans for a 165ft tower in the same spot.

Living well past the century, Niemeyer's journey mirrored that of his beloved Brazil, and his restless modernism captured the developing country's sweeping ambitions. Even in the last few days, he had been working, taking visits from engineers and other professionals.

He remained married for 76 years to Annita Baldo, his first wife. He married his second wife, longtime aide Vera Lucia Cabreira, in 2006 at the age of 99. She survives him, as do four grandchildren. Niemeyer's only daughter, an architect, designer and gallery owner, Anna Maria, died on June 6 at the age of 82.