For more than a century, Dorothea Tanning collided and consorted with artistic titans of the 20th century who included Pablo Picasso, John Cage and Joseph Cornell. She designed sets for George Balanchine ballets, played romantic matchmaker for poet Andre Breton and appeared in Hans Richter’s avant-garde films. But she remained best known as the wife of Surrealist Max Ernst, to whom she was married for nearly 30 years.

Ms. Tanning, who was also a celebrated American artist and poet, and who came to be known as “the last living Surrealist,” died Jan. 31 at her New York home, according to the Dorothea Tanning Collection and Archive, a foundation she established in 1995 to preserve her work. The cause of death was not provided. She was 101.

Among her best-known paintings is “Birthday,” her hyper-realist 1942 self-portrait. Los Angeles Times art critic Christopher Knight described it as “an image of awakening power.”

In “Birthday,” the artist presents herself as bare-breasted and barefoot. Lurking at her feet is a mythical beast, a basilisk, “which could kill with just a puff of its poison breath,” Knight wrote. “Tanning seems capable of accomplishing the same with just a glance.”

Dorothea Margaret Tanning was born Aug. 25, 1910, in Galesburg, Ill., the child of Swedish immigrants.

Determined to escape small-town conservatism, Ms. Tanning moved to Chicago in 1934 after dropping out of Knox College in Galesburg. She briefly attended art school in Chicago before embarking on big-city adventures. Ms. Tanning later claimed a liaison with a Chicago gangster who was murdered during their date and a job interview in which she was persuaded to shed her clothes.

Ms. Tanning soon moved to New York and settled into commercial illustration until a 1936 show at the Museum of Modern Art, “Fantastic Art, Dada, Surrealism,” inspired her to become a serious painter. She set off for France in the summer of 1939, hoping to meet some of her heroes. But the advent of World War II led her to return home.

Back in New York, Ms. Tanning’s art career received a boost when gallery owner Julien Levy took her under his wing and another boost when art patron Peggy Guggenheim sent her husband, Max Ernst, to Ms. Tanning’s studio to choose a painting for inclusion in “Exhibition by 31 Women,” an important 1943 show at Guggenheim’s New York gallery.

Ernst was entranced by Ms. Tanning’s unfinished self-portrait — later dubbed “Birthday” — and equally taken with the beautiful artist.

Within two years, Ms. Tanning had her first solo exhibition, at Levy’s gallery. Within four, she became Ernst’s fourth wife (in a double ceremony with photographer-filmmaker Man Ray and Juliet Browner) and moved to Sedona, Ariz., where they built a house with their own hands.

Ms. Tanning collaborated on Balanchine ballets and painted some of her best-known canvases in the 1940s and early ’50s, including such theatrical tableaux as “Interior With Sudden Joy” and “Eine Kleine Nachtmusik.”

Living and working alongside Ernst until his death in 1976, Ms. Tanning continued to make paintings and sculptures in the shadow of an art world legend. She created many of her stunning works despite being regularly interrupted by visits from such luminaries as Henri Cartier-Bresson, Marcel Duchamp and Dylan Thomas.

“I even made a note one summer in my notebooks: 44 days, 47 visits,” she once said. “I would have painted three times as many pictures otherwise.”

The couple moved to France in 1949 and spent more than two decades there. Ms. Tanning’s paintings grew increasingly abstract, her figures becoming so fluid that bodies dissolved altogether. By the late 1960s, she had turned to soft fabric sculptures, fantastical furniture in which tweed torsos burst through walls and furry limbs mingled.

After returning to New York in 1980 and recovering from a stroke, Ms. Tanning focused her creative energy on another childhood pleasure: writing. She wrote a novel, “Chasm,” and a 1986 memoir, “Birthday,” which she expanded into the 2001 book “Between Lives.”

In her late 80s, Ms. Tanning found a new outlet in poetry. She jokingly referred to herself as “the oldest living emerging poet.”

By 90, she had published poems in the Paris Review and won a place in “Best American Poems of 2000.” She later wrote two well-reviewed volumes of poetry, “A Table of Content” (2004) and “Coming to That,” which the New Yorker called one of the best books of 2011.

In 1994, Ms. Tanning created and endowed the Wallace Stevens Award, which each year grants $100,000 to an American poet.

She had no immediate survivors.

When asked a decade ago how her life might have been different if she had not thrown in her lot with Ernst, Ms. Tanning said she had no regrets. In 1990s, she wrote in the poem “Stain”:

Many years ago today

I took a husband tenderly

This simple human gentle act

Seen as a hard decisive fact

By all who dote on category

Did stain my work indelibly

I don’t know why that is

For it has not stained his.

— Los Angeles Times