W.S. Merwin, a prolific and versatile poetry master who evolved through a wide range of styles as he celebrated nature, condemned war and industrialism and reached for the elusive past, died today. He was 91.

A Pulitzer Prize winner and former U.S. poet laureate, Merwin completed more than 20 books, from early works inspired by myths and legends to fiery protests against environmental destruction and the conflict in Vietnam to late meditations on age and time.

>> W.S. MERWIN: Expression through poems and palms

He wrote rhymes and blank verse, a brief report on the month of January and a book-length story in verse about colonialism and the birth of modern Hawaii. Like his hero, Henry David Thoreau, he was inspired equally by reverence for the planet and anger against injustice.

He died in his sleep at his home on Maui, according to publisher Copper Canyon Press and the Merwin Conservancy, which the poet founded.

“He is an artist with a very clear spiritual profile, and intellectual and moral consistency, which encompasses both his work and his life,” fellow poet Edward Hirsch once said of him.

Merwin received virtually every honor a poet could ask for — more, it turned out, than he desired.

Citing the Vietnam War, he declined a Pulitzer in 1971 for “The Carrier of Ladders,” saying that he was “too conscious of being an American to accept public congratulation with good grace, or to welcome it except as an occasion for expressing openly a shame which many Americans feel.”

He also rejected membership in the National Institute of Arts and Letters, now the American Academy of Arts and Letters, but changed his mind five years later, in 1977.

Among other awards he accepted: a National Book Award for “Migration” in 2005, a Pulitzer in 2009 for “The Shadow of Sirius,” and such lifetime achievement honors as the Tanning Prize, the Bollingen Prize and a gold medal from the arts academy. He was chosen the country’s poet laureate in 2010 and served a single one-year term.

The changes in his work were no more dramatic than the changes in his life, which spanned continents and religious faiths. The son of a Presbyterian minister, he was raised in the urban East during the Great Depression, spent years as a young man in France, Mexico, Spain and England and lived his final decades as a Buddhist in a solar-powered house he designed on an old pineapple plantation, surrounded by a rain forest, on the northeast coast of Maui.

“There was something incomplete about the world of streets and sidewalks and cement,” he told the Paris Review in 1986. “I remember walking in the streets of New York and New Jersey and telling myself, as a kind of reassurance, that the ground was really under there.”

William Stanley Merwin was born in New York City in 1927. He soon moved to Union City, New Jersey, living for years on a street now called “W.S. Merwin Way,” then to Scranton, Pennsylvania.

In a long, autobiographical poem, “Testimony,” he remembered his father as a weary, disappointed man, subsisting on “pinched salaries” and “traveling sick with some nameless illuminating ill.” His mother was orphaned early in life and grieved again when her baby, a boy she meant to name after her father, died “when he had scarcely wakened.”

In a household as grim as an abandoned parking lot, the way out was pointed by words, which seemed to float around Merwin like magic bubbles. He would try to memorize scripture he heard his father recite and fairy tales his mother toll him. By age 13, he was already composing hymns.

He received a scholarship from Princeton University, becoming the first family member to attend college, and began meeting some of the great poets of the present and future. Galway Kinnell was a classmate at Princeton, and John Berryman a teacher.

After graduating, he lived in Spain and tutored the son of Robert Graves. In London, he became close with Sylvia Plath and Ted Hughes and was torn by the collapse of their marriage. Merwin’s then-wife, Dido Merwin, would allege that Plath had a crush on him.

In Washington, D.C., when he was 18, Merwin had a memorable encounter with Ezra Pound, whom he visited at a psychiatric hospital. Pound urged Merwin to write 75 lines a day (advice he did not follow), warned him he didn’t have enough experience to write great poetry and advised him to learn another language as a way of better mastering English. Merwin would translate more than 20 books by other poets, from languages ranging from Sanskrit to Swedish.

Merwin’s promise was obvious. His first collection, “A Mask for Janus,” was selected by W.H. Auden for the coveted Yale Series of Younger Poets competition and was published in 1952. Throughout the 1950s, he wrote poems and plays, including a verse production of “Rumpelstiltskin.”

Times spent in Boston with Robert Lowell convinced him to concentrate on poetry, and by the end of the decade, he was regarded as a highly talented artist immersed in Old English literature, his verse likened by The New York Times to “a broad river flowing through peaceful land.”

Peace — the flow of the natural world — was a cause he actively defended. Near the end of World War II, he spent seven months under psychiatric care because he refused to undergo any duties that might lead to violence, which he had feared since the days his father would beat him.

By the early 1960s, he was marching against nuclear weapons and throwing off the rules of grammar as if they were a suit and tie, inspired by his “growing sense that punctuation alluded to an assumed allegiance to the rational protocol of written language.”

Meanwhile, Vietnam and urbanization darkened his vision. “I/can hear the blood crawling over the plains,” he wrote in “The Child.” In “The Crust,” the downfall of a tree is a metaphor for the severing of civilization:

and with the tree

went all the lives in it

that slept in it ate in it

met in it believed in it

Merwin examined his own mind in “Plane” and found it “infinitely divided and hopeless/like a stockyard seen from above.” His poem “Presidents” was a roll call of dishonor, for “the president of shame,” ”the president of lies” and the “president of loyalty,” who “recommends blindness to the blind.” In “Sunset After Rain,” he concluded that “The darkness is cold/because the stars do not believe in each other.”

In the 1970s, he settled permanently in Hawaii and studied under the Zen Buddhist master Robert Aitken. Divorced years earlier from Dorothy Jeanne Ferry and from Dido Milroy, he married his third wife, Paula Schwartz, in a Buddhist ceremony in 1983. Paula died in 2017.

Merwin’s work became sparer, rooted in the Hawaiian landscape and his personal past — how it’s often forgotten, how it’s never understood at the moment it’s lived, how words themselves were imperfect bridges to lost time.