Among the many things they have in common, President Trump and John Bolton, his newly designated national security adviser, both have traded insults with North Korean leaders. After Bolton called Kim Jong Il, the father of the current leader, a “tyrannical dictator” during the George W. Bush administration, Kim labeled the then-State Department official the “envoy of evil” and “rude human scum.”

Trump and Bolton also have volatile tempers and a tendency to want to fire those who challenge them.

In recent months, Bolton has echoed Trump’s use of Twitter for pithy statements about complicated issues. The Iran nuclear deal was a “mistake,” he tweeted, and the United States should “tear [it] up.” He lauded Trump’s recognition of Jerusalem as Israel’s capital as an “injection of reality.”

Like Trump (sometimes), however, he has opined that a military strike against North Korea would be more effective than trying to negotiate. During negotiations over Iran’s nuclear program, he suggested that bombing Iran was a better option.

On Sept. 10, President Trump fired John Bolton as his national security adviser. Here are some instances that earned Bolton his hawkish reputation. (Sarah Parnass/The Washington Post)

At times, Bolton has edged toward disagreement with the president. “I personally believe we should increase migration,” he tweeted, although he supported Trump’s “merit” based visa plan.

But where the scion of New York wealth and the son of a Baltimore firefighter truly differ is the experience and knowledge they bring to their jobs.

Bolton, 69, has spent a long career in foreign policy, and is deeply versed in national security issues of the past several decades. He is also known among both admirers and critics for his masterful grasp of how to manipulate the bureaucracy and the policymaking process.

He has long been scorned by Democrats, and a not-insignificant number of Republicans, for using those skills in pursuit of hard-line, doctrinaire views, as well as for his legendary abrasive treatment of underlings and perceived fools, and a creative definition of the truth when it suits his purposes.

Unlike Trump, whose politics and party affiliation have often shifted, Bolton was a card-carrying conservative from the start. As a high school student, he took the day off (with permission) to hand out election-day leaflets in support of Barry Goldwater, the 1964 GOP presidential candidate who demanded the defeat of a nuclear-armed Soviet Union.

Later, as a scholarship student at Yale University, Bolton considered himself a “libertarian conservative,” according to his 2007 autobiographical book, Surrender Is Not an Option .” Given “prevailing campus political attitudes,” reflected in student strikes and anti-Vietnam War mobilization, “I might as well have been a space alien,” he wrote.

After Yale Law School, Bolton interned in the office of then-Vice President Spiro Agnew, a fellow Marylander he admired, before becoming an associate at Covington & Burling, the prestigious Washington law firm. He left to join the Reagan administration in the Agency for International Development, where, he said, his goal was to make foreign aid more “market driven.”

After another stint in private law practice, Bolton worked at the Justice Department, under Ronald Reagan’s attorney general, Edwin Meese, where he helped shepherd the failed Supreme Court nomination of Robert Bork, and the successful effort of Antonin Scalia.

When Reagan left office, Bolton moved to the State Department under new president George H.W. Bush and his chief diplomat, James Baker, as assistant secretary in charge of international organizations, including the United Nations. There, he later wrote, he concentrated on “the ineffectiveness, corruption and mismanagement that characterized so much of the U.N. system.”

It was at State, he wrote, that he learned how to circumvent the bureaucracy or, when necessary, to use it to his advantage. “While not exactly scintillating to outsiders,” he wrote, “surviving and flourishing in a federal bureaucracy is often the difference between failure and success, which I define as implementing the president’s policies.”

“Since the bureaucracy defines success differently — who sat where at the daily morning staff meeting, whose name appeared first on the ‘from’ line of a memo to the secretary, who went on what trip, and other such weighty questions — I often got what I wanted by giving the bureaucracy what they wanted.” Yielding on process to win on substance, Bolton wrote, “was like buying Manhattan for beads and shells.”

Bolton spent most of what he called the “wilderness” years of the Clinton administration at the American Enterprise Institute, a conservative think tank that became his home when Republicans were out of power.

In 2000, he offered to help Baker, the man he considered his mentor in diplomacy, as part of presidential contender George W. Bush’s legal team, contesting the Florida vote against Bill Clinton’s vice president, Al Gore. Assigned to oversee the counting of paper ballots in Palm Beach County, red-faced, mustachioed Bolton became a familiar media figure. Some local officials, down whose necks Bolton and other partisan observers breathed, later described him in newspaper accounts as “rude” and overbearing.

But the victory he helped win brought Bolton attention and admiration from Bush’s soon-to-be vice president, Richard B. Cheney. Colin Powell, named as the new administration’s secretary of state, later recalled Cheney pushing him to hire Bolton as a senior diplomat.

Powell agreed, he later said, despite misgivings. “The book I had gotten on John was that John will push the edge constantly, and he will get you in trouble on a regular basis” and “break china all over the world,” but could be a useful attack dog. At the same time, Powell said, he believed that Bolton was being placed at State as a Cheney spy.

Bolton was already a polarizing figure, and won a confirmation as undersecretary for arms control and international security with the support of Senate Foreign Relations Committee Chairman Jesse Helms (R-N.C.), who said that Bolton was the kind of man he wanted by his side at Armaggedon.

Among the policy moves Bolton counted as victories, he worked to ensure that the United States would not participate in the International Criminal Court — something he later called “my happiest moment at State” — and the Bush administration’s withdrawal from the Anti-Ballistic Missile Treaty with Russia. In the run-up to the Iraq War, he wrote the State Department Fact Sheet distributed to reporters that claimed Iraq’s Saddam Hussein had sought to purchase uranium for nuclear weapons from Africa, an assertion the administration had reason to believe at the time was false.

Bolton was, and remains, an ardent supporter of the 2003 U.S. invasion of Iraq — a war Trump first supported, later disavowed, and recently said had made the United States look “like the dummies of the world, because we had bad politicians running our country for a long time.”

He worked to undermine multiparty negotiations with North Korea and Iran — both of which he thought were pointless and should be replaced with hard-line stands, and reportedly kept Cheney and Donald H. Rumsfeld’s Pentagon informed of diplomatic efforts to help scuttle them. When Powell, at a crisis point in North Korea negotiations, told reporters that the administration was working to get them back on track, Bolton made his own calls to the media to say that was not true.

In 2005, Bush nominated Bolton to be his ambassador to the United Nations. State Department and intelligence officials lined up to testify against him during lengthy and contentious hearings.

The State Department’s chief bioweapons official said that in 2002, Bolton had prepared a speech charging that Cuba had a secret biological weapons program, despite analysis to the contrary, and then tried unsuccessfully to have the analyst fired. The charge was backed up by the analyst’s boss, Assistant Secretary for Intelligence Carl Ford, who famously described Bolton in congressional testimony as a “kick-down, kiss-up” kind of guy.

In a floor speech opposing Bolton’s confirmation, Sen. Carl Levin (Mich), then the ranking Democrat on the Armed Services Committee, warned that “in the near future, we may face a crisis over North Korea’s nuclear program or Iran’s nuclear intentions. Congress and the public must be confident that intelligence assessments represent information that has been assessed objectively, not shaped to serve policy goals.”

Levin also said that Bolton had asked the intelligence community to reveal the names of Americans mentioned in intercepted communications, saying they “could be part of an effort by this nominee to politicize and punish.”

Most Republicans supported the nomination, and many Bush national security officials testified to Bolton’s skill and value. Then-Senate Foreign Relations Committee Chairman Richard Lugar (R-Ind.), harshly criticized attacks against him, saying in his own floor speech that the United States needed an ambassador “whose knowledge, experience, dedication and drive will be vital to protecting the American interest in an effective, forward-looking United Nations.”

When the Republican-majority Senate failed to confirm him in summer of 2005, Bush awarded Bolton with an interim appointment as U.N. ambassador, which lasted until Democrats took control of Congress in the 2006 elections.

Returning to AEI, Bolton has been a prolific speechmaker, tweeter, writer of op-ed articles and paid commentator on Fox News. “I have never been shy about what my views are,” he told Fox on Thursday, after news of his appointment.

But “frankly, what I have said [as a private citizen] is now behind me,” he said. “The important thing is what the president says and the advice I give him.”

John Hudson, Greg Miller and Greg Jaffe contributed to this report.