(Bastien Inzaurralde/The Washington Post)

Rep. Mike Pompeo (R-Kan.) knew that Democrats had set a trap, asking if he would support using torture against suspected terrorists. “I will always comply with the law,” Pompeo, the nominee to be CIA director, told senators Thursday.

With that and several other deft answers, Pompeo defused a potential land mine during his Senate confirmation hearing and now is well on his way to swift confirmation.

The day before, during his own confirmation hearing to be secretary of state, Rex Tillerson stumbled into the most basic of pitfalls, falling over a six-word question: Is Vladi­mir Putin a war criminal?

“I would not use that term,” Tillerson responded.

Tillerson went on to endure a rocky hearing and, while his nomination is still very much alive, the former ExxonMobil chief executive will now have to answer a lengthy list of follow-up questions from senators left underwhelmed by his performance. Tillerson might now need a couple more weeks to convince several Republican national security hawks that he is the right man to be the nation’s top diplomat at time when relations with Russia are at the forefront.

The two nominees to President-elect Donald Trump’s Cabinet handled things very differently, serving as useful examples to future nominees for what to do — and what not to do — when trying to join one of the most controversial administrations in modern presidential history. They demonstrated how to avoid trouble (or walk into it) and how to cater to senatorial ego (or to infuriate it).

By and large, Trump’s Cabinet nominees performed well over the past week. Sometimes they gave firm commitments to uphold the law — always a smart play in confirmation hearings because the senators, after all, make the laws — and sometimes they paid the right compliment.

Most insiders believe that the Senate will confirm at least four, maybe more, of Trump’s Cabinet nominees after the president-elect is sworn in Friday afternoon. Three are likely to come from the national security arena: Pompeo at CIA and two retired generals, James N. Mattis to be secretary of defense and John F. Kelly to be homeland security secretary.

Additionally, Elaine Chao’s nomination to be transportation secretary is certain to come on Trump’s first day in office, given that Democrats know her well as the wife of Senate Majority Leader Mitch McConnell (R-Ky.).

However, some of the more politically treacherous showdowns are still to come for Trump’s nominees: Betsy DeVos for education secretary on Tuesday; Tom Price for health and human services secretary on Wednesday; and Steven Mnuchin for treasury secretary on Thursday.

Democrats have targeted the vast financial holdings of DeVos and Mnuchin, their business practices and potential conflicts of interest. Like Tillerson, both come from the private sector and have never had to withstand anything like the grilling that comes with a public Senate confirmation hearing.

Price (R-Ga.), a 12-year veteran of the House, is facing questions about stock trades he made in the health industry. But just like Sen. Jeff Sessions (R-Ala.), Trump’s attorney general nominee who emerged mostly unscathed from his confirmation hearing, Price may perform well given he is familiar with the long and sometimes tedious nature of congressional hearings.

All of Trump’s nominees are undergoing “murder boards” inside the presidential transition headquarters in downtown Washington, where a life-size hearing room was constructed well in advance of Election Day to help whichever team won the presidency. Former senators have volunteered to come in and sit behind the committee dais to grill the nominees.

Democrats and Republicans can learn from what transpired in the first round of hearings as they prepare for the combative matchups ahead.

First and foremost, when in doubt, complimentary comedy is always a good fallback.

Ben Carson, Trump’s pick to be secretary of housing and urban development, may be the least qualified of the president-elect’s cabinet selections, even saying so himself not long after Trump’s victory. “Dr. Carson feels he has no government experience; he’s never run a federal agency,” a friend said in November.

Some Republicans feared he would wilt under questioning about the intricacies of the sprawling bureaucracy that includes the federal housing system. Sen. Sherrod Brown (Ohio), the top Democrat on the panel, kept peppering Carson with questions until the nominee cut him off — almost always the wrong thing to do in a confirmation hearing.

“You remind me of ‘Columbo,’ ” Carson deadpanned.

The room burst into laughter, with even Brown acknowledging the similarities to the 1970s TV show about the disheveled homicide detective and his own appearance. Carson is now seen as very likely to win confirmation.

Every senator should study Sen. Marco Rubio’s exchange with Tillerson. The Florida Republican understood the cardinal rule of Senate hearings: Ask short, fast questions — rather than use the time to make a speech — to draw as many responses as possible, because nominees run into trouble with their own words.

After Tillerson stumbled over his “war criminal” question, Rubio read a list of atrocities that the Russian military has been a party to in Syria and other parts of the world. Rubio, one of many Republicans pushing for a tougher policy toward Moscow, asked if Tillerson believed that Putin murdered political opponents.

“People who speak up for freedom and regimes that are oppressive are often at threat and these things happen to them,” Tillerson responded. “In terms of assigning specific responsibilities, I would have to have more information.”

Rubio has still not said whether he will support Tillerson.

Pompeo went in the opposite direction.

Democrats tried to draw him out on some of Trump’s more controversial statements, including support for enhanced interrogation techniques that have been outlawed and for sharply criticizing intelligence officials for their conclusions that Russian operatives meddled in the 2016 presidential election.

Pompeo told members of the Senate Intelligence Committee that it was “pretty clear” Russia was behind the hacks of the Democratic National Committee’s email system and called the CIA “the finest intelligence agency the world has ever known.”

That’s why Pompeo will get confirmed long before Tillerson.

Read more from Paul Kane’s archive, follow him on Twitter or subscribe to his updates on Facebook.