For Republicans who still believe in the conservative principles that long defined the Grand Old Party, Donald Trump’s presidency has been a troubling time. He has jettisoned many of the precepts that were integral to Republicanism just a half-decade ago, transforming what was once a party of intellectually coherent ideas into an odd congeries of ill-sorted notions. His exercise of power is impelled not by a careful consideration of the national interest but by the impulses of power preservation and pique, whim and wish, ridicule and revenge.

Fortunately, the primary process provides an outlet for frustrated Republicans who want their party to aspire to more. They can cast a vote for William F. Weld, an astute, able, and affable former prosecutor and Massachusetts governor whose nomination would help restore principle and probity to the GOP.

The Globe endorses Elizabeth Warren

If a Republican Rip Van Winkle had dozed off during Ronald Reagan’s presidency to wake during President Trump’s, he would no longer recognize his party.

A belief in free markets has long been a cornerstone of conservative ideology. Trump, however, shows little appreciation for them. On trade, he’s been a tariff-happy president who has engaged this country in a counterproductive multifront trade war in pursuit of new trade agreements that boast of far more than they deliver. If trade-cheat China were his only target, that would be one thing. But Trump has bullied Mexico, Canada, and the European Union with tariffs or their threat. Similarly, he has browbeaten US firms for shuttering factories in this country or shifting some production elsewhere.

How and why does the Globe endorse presidential candidates?

He is no more respectful of the rule of law, a concept that undergirds the entirety of the American experiment. Not only does this president believe he has untrammeled authority to do whatever he likes, he thinks the United States attorney general should function both as his political protector and as the legal antagonist of his enemies.

In the supply-side era, the GOP’s erstwhile commitment to fiscal discipline has been episodic at best: It rises during Democratic presidencies only to recede when Republicans occupy the Oval Office. Under Trump, however, it has disappeared entirely. The annual federal budget deficit has now crested $1 trillion — and this during strong economic times, when a nation should be getting its books in order.

As for rational, fact-based, adult-party decision-making, that Republican legacy, too, is all but spent. Take climate change. GOP denialism predates Trump, of course, but a Republican president determined to lead on the subject might just bring his party around. Trump, however, looks askance on any effort to restrict fossil fuels because of the short-term economic boost their extraction gives America.

And though the Republican Party once favored a leading American role in the Western world, Trump has looked skeptically on our democratic allies and alliances, while making little secret of his admiration for global strongmen. His deference to dictators means they needn’t worry about US condemnation of human-rights abuses.

It goes almost without saying that for Republicans who cherish the GOP’s distant legacy as the party of Abraham Lincoln, this president’s racism and nativism should be particularly repellent.

Nominating William F. Weld would move the Republican Party from cultish adherence to the person of the president to the traditional tenets and propriety of the office.

“If you are not satisfied with what he’s done, if you have questions about him because of what’s been rolled out in the impeachment, if you believe with me that climate change is not a hoax and that trillion-dollar deficits are not a good idea and that we shouldn’t cotton up to dictators like Putin and insult all our allies . . . then I am your alternative,” declares Weld. “It’s Trump who’s a Republican in name only.”

Although sometimes dismissed as a gadfly because of his Libertarian Party vice presidential bid in 2016, Weld is a solid, substantive, hyper-smart figure. As governor of Massachusetts from 1991 to 1997, he demonstrated an ability to work with an overwhelmingly Democratic legislature to produce impressive results.

Best known is the state’s landmark 1993 standards-based education-reform law. But he also tamed a large structural budget deficit. Republicans everywhere, meanwhile, should like his record of balancing the state budget without new taxes — and then delivering a succession of tax cuts.

Weld, an avowed environmentalist, sees a carbon tax as the smart, market-driven way to reduce carbon dioxide emissions. He’d rebate those revenues in a progressive way to give modest earners a bigger boost.

Neither a neoconservative nor a neo-isolationist on foreign policy, Weld would re-embrace an arm-in-arm internationalism with Western allies.

“There is a world order out there, and it is one the United States was instrumental in creating, post-World War II,” he says. “It has led to great prosperity in the world. . . . It is worth adhering to that.” Recognizing the huge mistake Trump made in abandoning the Iran nuclear deal, he would try to return to such an arrangement.

As a high-level former federal prosecutor, Weld understands both the constitutional constraints that should limit presidential behavior and the ethical restraints that should guide all public servants. It’s impossible to imagine him ever becoming involved in anything like Donald Trump’s Ukraine scandal.

Nominating Weld would also help restore dignity and decency to the national conversation. A personable practitioner of collegial politics, he is able to disagree without being disagreeable. His dry, sly wit would be a welcome tonic to Trump’s tawdry discourse.

A ballot for Weld, then, is a vote both to salvage time-honored conservative principles and to change the shabby tone of the Trump era.

It hardly need be said that Weld is unlikely to wrest the Republican presidential nomination from the incumbent. He managed to garner only 9 percent of the GOP vote in New Hampshire. But even by giving Bill Weld a strong result, Republicans dismayed with Donald Trump’s course could trigger an important intra-party debate about ideas and integrity.