Peter Mayle, a writer and onetime advertising executive who transformed his fumbling adjustment to life in the south of France into the best-selling "A Year in Provence" and other books, sending thousands of people to the Mediterranean in search of the sun, food and wine, died Jan. 18 at a hospital near his home in Lourmarin, France. He was 78.

His publishing company, Alfred A. Knopf, announced the death. The cause was not disclosed.

Mr. Mayle (pronounced "Mail") had been an advertising executive in New York and his native England before he and his wife bought a ramshackle stone house in Provence in 1986.

"We saw it one afternoon and had mentally moved in by dinner," he wrote in "A Year in Provence."

A comical cast of local tradesmen came and went, working only when in the mood, as Mr. Mayle's 200-year-old farmhouse remained uninhabitable.

"Every time I sat in one room and tried to work on the novel," he told the New York Times in 1991, "the builder would come in and say, 'We're knocking a hole in that wall, so you'll have to go somewhere else.' "

Mr. Mayle made little progress on the novel he hoped to write, writing letters to his agent describing his frustrations. The agent suggested he shelve the novel and write about life in Provence. Soon enough, Mr. Mayle developed a growing admiration for the Mediterranean pace of life, built around visits to the town cafe, where timetables were ignored in favor of conversation, crusty bread and a bottle of wine.

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

He wrote "A Year in Provence" as a chronicle of a calendar year, beginning with a New Year's Day lunch and ending with a Christmas feast — in Mr. Mayle's new home, renovated at long last.

Published in Britain in 1989 and in the United States a year later, it was expected to sell only a few thousand copies. But the book caught on through word of mouth, as readers were charmed by Mr. Mayle's evocation of a rural world where the only thing that seemed to matter was the quality of life.

"I confess to having read this delightful memoir not once, not twice, but four times now," critic Michele Slung wrote in her Washington Post review.

Practically every page throbbed with mouth-watering descriptions of the local food and wine.

A local restaurant owner "rhapsodized over the menu: foie gras, lobster mousse, beef en croute, salad dressed in virgin oil, hand-picked cheeses, desserts of miraculous lightness, digestifs. It was a gastronomic aria which he performed at each table, kissing the tips of his fingers so often that he must have blistered his lips."

More than 5 million copies of "A Year in Provence" were sold worldwide.

Mr. Mayle quickly followed with a second bestseller in 1991, "Toujours Provence." A British TV series was based on "A Year in Provence," and soon hordes of visitors were arriving in southern France, crowding the streets, knocking on Mr. Mayle's door and casting shadows over the idyllic life he had described. He found people picnicking on his doorstep, walking through his property and splashing in his backyard pool.

"These visitors have become pests," he said in 1993. "We cannot take it anymore and we want to be out of here by the end of the summer."

There was an inevitable backlash from local residents and British expatriates, who accused Mr. Mayle of ruining their Provençal paradise.

"What did you learn from this book?" a French neighbor told The Post in 1994. "That we eat a lot, that we drink a lot, that everything happens slowly."

The local bar owner fumed, "Are my glasses dirty? Did you catch fleas in here? Are the toilets really disgusting?"

Mr. Mayle moved to Amagansett, on New York's Long Island, for several years, writing novels and other books evoking the life of Provence. He returned to France in the late 1990s, settling several miles from his original house but careful not to reveal the exact location.

Peter Gareth Mayle was born June 14, 1939, in Brighton, England. His father worked for British foreign service.

Mr. Mayle left school at 16 and by his early 20s was working in New York for a firm led by British advertising tycoon David Ogilvy. After considerable success, Mr. Mayle set out on his own in the 1970s to write books, specializing at first in children's titles, often on such sensitive subjects as sex, divorce and death.

His humorous children's guide to reproduction, "Where Did I Come From?," was widely translated and sold more than 2 million copies. He also published several books in the "Wicked Willie" series, featuring a talking cartoon penis.

Mr. Mayle eventually published the novel he first set out to write in Provence, "Hotel Pastis" (1993), along with several others, including "A Good Year," about an Englishman who enters the wine business. It was adapted into a 2006 film starring Russell Crowe and directed by Ridley Scott — one of Mr. Mayle's neighbors in Provence.

He also published a series of mystery novels set in the Mediterranean and published other books about Provence and the finer things in life, including custom-made shoes.

His marriages to Pamela Mayle and Nicola Mayle ended in divorce. Survivors include his wife of more than 40 years, Jennie Mayle; three sons from his first marriage; two daughters from his second marriage; and several grandchildren.

In 2006, Mr. Mayle described the kind of life he learned to lead in Provence after a high-pressure career in advertising.

"I don't want to do 50 pushups before breakfast," he said. "Instead, I want to enjoy the things that one can enjoy at my age: friendship, food and drink, the beauties of nature. The only thing I want from tomorrow is that it should be as good as today."