Much of Europe was still recovering from World War I when Alastair George Maitland, not yet 5, donned a sailor suit to pose with his British expatriate family against a backdrop of Ugandan vegetation. The photo was among the earliest to capture the ease he felt in living abroad.

Rising years later through the British diplomatic service, he spent nearly a half-century representing his government in places as distant as the Middle East, Canada, and the United States. He concluded his diplomatic career in Boston, where at times he had to remind those outside his circle there was more to his work than pomp and ceremonies.

Alastair Maitland (right) at age 4 in Uganda with his brother, Douglas.

“To most of the general public, the consular life is a continual round of dinners and parties,’’ Mr. Maitland told the Globe in 1972. “While attending these social affairs is certainly a part of a consul’s duties, it’s not all a life of skittles and ladies by any means.’’

Mr. Maitland died in his home in Heath on Dec. 21 from complications of cardiac and respiratory illnesses. He was 95.

After living in dozens of cities throughout the world, Mr. Maitland had moved into a farmhouse in the sparsely populated town in Western Massachusetts in the mid-1970s to begin a politically active retirement.

As Britain’s consul general in Boston earlier in that decade, Mr. Maitland often was the face of his country in the Northeast. His office helped make the lives of British citizens in the region run smoother, but he also dealt with trade relations and thorny diplomatic matters that went well beyond passport and visa disputes.

“He certainly shocked Billy Bulger and others by being totally involved and not afraid,’’ said Mr. Maitland’s son Angus, of New York City, referring to the former state Senate president.

Mr. Maitland’s job came with risks. He made headlines when his office was the target of a bomb threat, and again when protesters streamed in to decry shootings in Northern Ireland.

He told his family that while police did their part to keep protesters at bay, he took a different tack. Mr. Maitland offered protesters copious amounts of tea, not just out of kindness, but to prompt frequent restroom visits and steer them out of his office.

“But this fracas was the exception,’’ he told the Globe in 1972. “I’ve been doing a lot of unexpected homework - rereading contemporary Irish history. Regardless of this present agitation, however, I am happy to be here in these circumstances. There are those who might think otherwise, but the truth is that I don’t regret it in the least.’’

Mr. Maitland’s expertise was in foreign trade and economic relations. His office encouraged British companies doing business in the area, and supported efforts to keep British exports flowing into US ports.

He also took ideas from the region back to Britain, drawing inspiration in particular from companies along Route 128 and the technological innovations they famously cultivated.

“His job was to keep communications open and to be an observer of what was going on and not be judgmental,’’ said his son Ian, of Minneapolis, adding that Mr. Maitland “certainly had the habit of sitting on the fence when it came to political affairs. He had a duty to remain impartial.’’

Standing 5 feet 6 inches, Mr. Maitland was introverted, bookish, and austere by nature, but was called upon to deliver formal speeches, which he usually peppered with literary references.

“I think he spoke beautifully and it was filled with puns,’’ said his daughter, Anne, of Washington Depot, Conn. “He made up for his stature with the way he spoke.’’

Among the occasions at which Mr. Maitland was asked to speak was a bicentennial observance in Concord in 1975.

“The battles of Concord and Lexington were not little skirmishes, but the assertion of the people of their right to govern themselves and to earn that right as citizens,’’ he told the Globe afterward.

“Standing on the bridge at Concord it was easy to imagine what happened there 200 years ago,’’ he said, “and I felt that my voice echoed that of John Hancock and others in standing for something for which I so deeply believe.’’

He also enjoyed interviewing candidates for Marshall Scholarships. In the 1950s, he helped develop the program, which awards scholarships to top university students in the United States who wish to continue their studies in the United Kingdom.

Mr. Maitland was born in Kampala, Uganda, where his father, a botanist and agronomist, was an adviser to African colonial governments. He grew up in Scotland and studied French, Spanish, economics, and public international law at Edinburgh University, from which he graduated in 1937 with a master’s degree.

He began working for the British foreign service in 1938, and was posted in Los Angeles, New York, and Chicago. He then moved to Ottawa before transferring to Paris, where he was part of the United Kingdom’s permanent delegation to the Organization for European Economic Co-operation.

“In his job, he was always meticulous, and even if there were frustrations, he put on a stiff upper lip and was courteous throughout,’’ said his son Ian.

Mr. Maitland returned to North America as consul general in New Orleans. Transfers took him to Jerusalem and Cleveland before his final posting in Boston. He retired in 1975 and became a US citizen five years later.

In his new home in Heath, Mr. Maitland became a strong proponent of ensuring that the town stay true to its agrarian roots, and he wrote newspaper columns promoting responsible development.

“He was known as a liberal spirit,’’ said longtime neighbor and friend Leighton McCutchen, who added that “zoning was the apex of his contributions.’’ When the town’s zoning bylaws were reviewed in the 1990s, he said, Mr. Maitland worked behind the scenes to protect wetlands and control growth.

“He had a very sophisticated, wry sense of humor,’’ said McCutchen’s wife, Martha. “He had a great sense of what was proper.’’

His friends and neighbors were delighted and impressed by how someone with such an impressive background could fit in seamlessly so many miles away from the big city. “As a friend, it was not necessary to talk about the friendship - it was just there, and it was understood and it was lovely,’’ longtime friend and neighbor, William MacLeish, of Charlemont said. Mr. Maitland’s first wife, the former Betty Hamilton, died in 1981. He had celebrated his 25th wedding anniversary with his wife, Hazel Porter, the day before he died.

In addition to his wife, daughter, and two sons, Mr. Maitland leaves two stepdaughters, Jennella Porter of Freetown and Laura Porter of North Attleborough; a stepson, John Porter of Delmar, N.Y.; three grandchildren; and five stepgrandchildren.

Family and friends will gather to celebrate his life at 2 p.m. on Jan. 14 in Charlemont Federated Church.