Boston Mayor Marty Walsh spent Thanksgiving weekend in Northern Ireland, to promote economic and cultural exchange between Boston and Belfast.

But legacy provisions of Massachusetts state law still cast a suspicious eye on companies doing business in Northern Ireland.

Take, for example, the South Egremont Village School, one of the last remaining one-room schoolhouses in Massachusetts.

Several years ago, the Berkshire County town recognized that the 1880s building was collapsing. So this summer, local officials undertook a major renovation project that included jacking up the old building, pouring a new concrete foundation and adding ramps and updated bathrooms to comply with the Americans with Disabilities Act.

But companies bidding to do the work had to first certify that they were not selling weapons for use in Northern Ireland.

That requirement is actually a standard provision of government contracts around the state. It has its roots in the decades of armed conflict in Northern Ireland known somberly as "The Troubles."

After years of armed struggle, by the early 1990s the British government and its largely Protestant supporters were creeping toward a peace agreement with the largely Catholic Irish Republicans. Catholics accused the British of imposing widespread discrimination in the province. Their allies in Boston and around the world were pressing businesses and governments to withdraw economic support from the British-run government.

Fr. Sean McManus had been a parish priest in Boston in the 1970s, but he moved to Washington and became a leading advocate for what were known as the MacBride Principles. The principles — based on a similar effort used to combat apartheid in South Africa — urged companies doing business in Northern Ireland to abolish discriminatory workplace practices, and pressed governments not to do business with companies that did not adopt the principles.

McManus said the concept was simple.

“What person in Massachusetts wants their dollar — their tax dollar — to be used to promote anti-Catholic discrimination in Northern Ireland?” he told WGBH News earlier this month.

Massachusetts became the first state in the country to pass a law embracing the principles in 1984. A decade later, the state adopted contracting requirements that included a ban on selling military hardware in the province.

There were dozens of large U.S. companies in the Ireland at the time. If they wanted to do business with the state, they would have to certify that they were not practicing religious discrimination in the workplace. They would also have to certify they were not making or selling military hardware there — including rubber bullets and tear gas that British police were using against Catholic protesters.

Northern Ireland has transformed dramatically in the decades since. Walsh visited Belfast last week to celebrate the sister-city relationship that encourages trade, investment and cultural exchange. And border posts that divided Northern Ireland from the South have been removed.

But Massachusetts law hasn’t changed, and the standard state contract still includes the Northern Ireland provisions.

The official language looks like this: “If the Contractor employs ten or more employees in an office or other facility located in Northern Ireland the Contractor certifies that it does not discriminate in employment, compensation, or the terms, conditions and privileges of employment on account of religious or political belief; and it promotes religious tolerance within the work place, and the eradication of any manifestations of religious and other illegal discrimination; and the Contractor is not engaged in the manufacture, distribution or sale of firearms, munitions, including rubber or plastic bullets, tear gas, armored vehicles or military aircraft for use or deployment in any activity in Northern Ireland.”

It’s not the only historic artifact in government contracts, said Brad Gordon, the general counsel of Rhode Island-based Gilbane company, a global construction firm that has worked on many major projects in the commonwealth.

“There are a number of oddities that I think just still live on in old forms of contracts that people reuse time and time again for many, many years,” Gordon said. “Dealing with Northern Ireland, not selling arms to Northern Ireland — it’s really not an issue anymore. And yet you still see it show up in documents. We still see documents that say we have to have a pay phone on every job site.”

The payphone thing is not a provision in Massachusetts state contracts.

But McManus disagrees that the state’s Northern Ireland contract provisions are an outdated relic.

“Non-discrimination continues to be extremely relevant in the United States, and in Ireland, and in every place in the world,” he said. “When does non-discrimination cease to be relevant? Perhaps in heaven.”