Nikki Haley faced a difficult task on Tuesday evening. Tapped by the Republican Party to deliver the response to President Obama’s final State of the Union address, the South Carolina governor attempted to draw a contrast with the president. It was a message clearly intended to convince a country that seven years under the thumb of the Democratic party has been seven years too many.

But the youngest governor in the United States, and daughter of immigrants, was not just trying to differentiate the Republican Party from the president. Haley was also trying to distance the party from Donald Trump, the Republican presidential frontrunner whose calls for a ban on Muslims entering the U.S. and harsh criticism of unauthorized immigrants has risked alienating voters that the Republican establishment desperately wants to attract.

Attempting to achieve both objectives at once, Haley, at times, sounded not so different from the president, who had also tried to outline an alternative to the politics of Trump.

There was the warning. Haley took aim at the real estate mogul without ever calling him out by name as she cautioned Americans not to give in to the allure of angry and divisive rhetoric. “During anxious times, it can be tempting to follow the siren call of the angriest voices. We must resist that temptation,” the governor implored. “No one who is willing to work hard, abide by our laws, and love our traditions should ever feel unwelcome in this country,” Haley added. The words echoed elements of Obama’s speech, in which the president called on Americans to “reject any politics that targets people because of race or religion.”

There was the admission of culpability. Haley asserted: “Democrats in Washington bear much responsibility for the problems facing America today.” But, she went on to say: “There is more than enough blame to go around. We as Republicans need to own that truth. We need to recognize our contributions to the erosion of the public trust in America’s leadership. We need to accept that we’ve played a role in how and why our government is broken.” It was a message that acknowledged that the American public is frustrated and fed up with career politicians and has lost trust in Congress. To some extent, that sentiment mirrored the way the president described his own frustration with the political status quo, and echoed his calls, implicitly aimed at Democrats and Republicans, to “change the system” to create “a better politics.”

Finally, there was the case for optimism. Haley spelled out her vision for an America that faces great challenge, but shows great promise. “Our country is being tested,” she said. “But we’ve been tested in the past, and our people have always risen to the challenge. We have all the guidance we need to be safe and successful.” It wasn’t sugarcoating, but it left room for hope. It sounded a bit like Obama’s framing of the present day as “a time of extraordinary change,” change, the president warned, that will create challenges, but may also lead to great opportunity.

Of course, Haley did not shy away from offering explicit criticisms of the president. “The president’s record has often fallen short of his soaring words,” Haley chastised, adding: “Soon, the Obama presidency will end, and America will have the chance to turn in a new direction.” The South Carolina governor savaged the president’s foreign policy and his health-care overhaul. Haley also highlighted Republican priorities on immigration, taxes, education, and the Second Amendment that set up a clear contrast with the administration.

For all the differences on display, however, Haley made a strong case that the nation can come together. To make that point, the governor told the story of how South Carolina removed the Confederate flag from the state capitol grounds in the wake of a deadly shooting at a black church in Charleston last summer. “Some people think that you have to be the loudest voice in the room to make a difference,” Haley said. “That is just not true. Often, the best thing we can do is turn down the volume. When the sound is quieter, you can actually hear what someone else is saying. And that can make a world of difference.”